[Overview][Constants][Types][Procedures and functions] Reference for unit 'ipc' (#rtl)

msgsnd

Send a message to the messague queue

Declaration

Source position: ipc.pp line 276

function msgsnd(

  msqid: cint;

  msgp: PMSGbuf;

  msgsz: size_t;

  msgflg: cint

):cint;

Description

msgsendsends a message to a message queue with ID msqid. msgpis a pointer to a message buffer, that should be based on the TMsgBuftype. msgsizis the size of the message (NOT of the message buffer record !)

The msgflgcan have a combination of the following values (ORed together):

0
No special meaning. The message will be written to the queue. If the queue is full, then the process is blocked.
IPC_NOWAIT
If the queue is full, then no message is written, and the call returns immediatly.

The function returns Trueif the message was sent successfully, Falseotherwise.

For an example, see msgctl.

Errors

In case of error, the call returns False, and IPCerroris set.

See also

msgget

  

Return message queue ID, possibly creating the queue

msgrcv

  

Retrieve a message from the queue

msgctl

  

Perform various operations on a message queue