National Institute of Advanced Industrial Science and Technology (AIST) This page is a page of the former research institute. We stopped updating on March 31.2001.
E-mail to webmaster (Japanese) E-mail to webmaster (English)
next up previous contents index
Next: Sockets Up: InterProcess Communication and Network Previous: Shared Memory

Message Queues and FIFOs

A message-queue is created by make-msgq-input-stream or make-msgq-output-stream. Each of these returns an instance of file-stream, which can then accept read and print operations like other streams connected to files. The fname slot of message-queue stream is set to the key when it is created.

To make a stream to FIFO, you first create a FIFO node with unix:mknod function by setting its second argument mode=#o10000, and you open it as a normal file. Message-queues and FIFOs are created locally on a machine and only provide communication channels within the machine.

Note that message-queues and FIFOs are not removed from the system even after the owner process terminates. Explicit use of unix:msgctl or ipcrm command is needed to delete them.

  make-msgq-input-stream key &optional (buffer-size 128) [function]

  make-msgq-output-stream key &optional (buffer-size 128) [function]

Hirofumi Nakagaki
Fri Mar 22 12:46:38 JST 1996