Interprocess Calls with Common Lisp


This is a simple CL wrapper for the libc-calls to do IPC.

Sample Client

You can build the sample client application using a simple call to GCC:
 gcc -g "sample-client.c" -o "sample-client"
The you can pass messages to a listener using
 ./sample-client -k 2222 -p "message in a bottle"


After loading the CL-IPC code using
 (asdf:oos 'asdf:load-op :cl-ipc)
 (use-package :cl-ipc)
you can start a very simple IPC listener that will terminate when it receives the message "quit" like this:
 (do-msg-queue (message 2222)
     (format t "Received Message \"~a\"" message)
     (when (string= "quit" message)
This will listen on the queue and evaluate the body code whenever there is a message.

If you need to do other things inbetween you can pass the argument :nowait and then test the resulting message. When it's nil the queue returned immediately without result:

 (defun idle-function ()
   ;; ...
   (sleep 1))

 (do-msg-queue (message 2222 :nowait t)
       ((null message)
         (format t "Received Message \"~a\"" message)
         (when (string= "quit" message)
An that's about all there is to it.

Mailing Lists


This project has not released any files. Use the CVS to checkout the module.


You can browse our CVS repository or download the current development tree via anonymous cvs, as described here