chickadee » posix-mq » mq-create

mq-create:procedure

mq-create is a wrapper around mq_open, which opens message queue referred to by name, and returns a message-queue descriptor by which the queue can be referenced in the future.

Argument PATH specifies the shared memory object to be created or opened. For portable use, name should have an initial slash (/) and contain no embedded slashes.

OFLAGS is a list of bit masks from the chicken file posix module which will be ORed together and passed to shm_open. It must contains exactly one of open/rdonly or open/rdwr and any of the other flags listed here:

open/excl
If open/create was also specified, and a message queue with the given name already exists, returns an error.
open/nonblock
open the message queue in nonblocking mode. In circumstances where mq_receive and mq_send would normally block, these functions instead fail with the error EAGAIN.

On successful completion mq-crate returns a new file descriptor referring to the message queue object.