Common Lisp Package: S-SYSDEPS

S-SYSDEPS is an abstraction layer over platform dependent functionality

README:

S-SYSDEPS

An Abstraction Layer Over Platform Dependent Functionality

S-SYSDEPS is an abstraction layer over platform dependent functionality. This simple package is used as a building block in a number of other open source projects.

Contents

Features

S-SYSDEPS abstracts:

  • managing processes
  • implementing a standard TCP/IP server
  • opening a client TCP/IP socket stream
  • working with process locks

Status

S-SYSDEPS is considered stable code.

News

November 2005 - Created as a seperate project.

Platforms

S-SYSDEPS is, by definition, written in ANSI standard Common Lisp but implemented using non-standard extensions. At the moment, ports for LispWorks (reference), OpenMCL, CMUCL and SBCL exist. Some other CL implementations are partially supported.

Installation

The S-SYSDEPS package is loaded using ASDF. There is an excellent tutorial on ASDF to get you started.

CL-USER 1 > (asdf:oos 'asdf:load-op :s-sysdeps) 

Example of setting up and using ASDF to compile and load the package

Usage

For usage examples please have a look at the package using S-SYSDEPS.

API Reference

There is automatically generated API Reference documentation available for the S-SYSDEPS package.

Mailinglist

There is no mailing list for this project.

Changelog

Release Notes:

  • release 1: moved S-SYSDEPS into a separate project under a new structure

TODO

  • Port to even more platforms.
  • Add some unit or functional tests
  • Some example code.

FAQ

Nothing appropriate.

Bugs

There are no known bugs.

Authors

S-SYSDEPS was written by Sven Van Caekenberghe. Ports to CMUCL and SBCL were contributed.

Maintainers

S-SYSDEPS is being maintained by Sven Van Caekenberghe.

License

You are granted the rights to distribute and use this software as governed by the terms of the Lisp Lesser General Public License (http://opensource.franz.com/preamble.html), also known as the LLGPL.

History

This file was part of S-XML-RPC and (N)KPAX.

References

There are no references.

Copyright © 2004-2005 Sven Van Caekenberghe, Beta Nine BVBA. All Right Reserved.

FUNCTION

Public

ALL-PROCESSES

Return a list of all processes currently running

CURRENT-PROCESS

Return the object representing the current process

GET-SOCKET-STREAM-PROPERTY (SOCKET-STREAM PROPERTY)

Get the value of a socket stream property, one of :remote-host :remote-port :local-host :local-port

KILL-PROCESS (PROCESS)

Kill the process represented by the object process

MAKE-PROCESS-LOCK (NAME)

Create a named process lock object

MULTIPROCESSING-CAPABLE-P

Returns t when this implementation is multiprocessing capable

OPEN-SOCKET-STREAM (HOST PORT &KEY CONNECT-TIMEOUT READ-TIMEOUT WRITE-TIMEOUT)

Create and open a bidirectional client TCP/IP socket stream to host:port

RUN-PROCESS (NAME FUNCTION &REST ARGUMENTS)

Create and run a new process with name, executing function on arguments

START-STANDARD-SERVER (&KEY PORT NAME CONNECTION-HANDLER)

Start a server process with name, listening on port, delegating to connection-handler with stream as argument

Private

STOP-SERVER (NAME)

Stop a named server

MACRO

Public

WITH-PROCESS-LOCK ((LOCK) &BODY BODY)

Execute body wih the process lock grabbed, wait otherwise

VARIABLE

Private

*SERVER-PROCESSES*

The list of processes created by S-SYSDEPS