GNU Info

Info Node: (ipc.info)msgsnd

(ipc.info)msgsnd


Next: msgrcv Prev: msgget Up: Messages
Enter node , (file) or (file)node

msgsnd
------

     int msgsnd (int msqid, struct msgbuf *msgp, int msgsz, int msgflg);

   * `msqid' : id obtained by a call to msgget.

   * `msgsz' : size of msg text (`mtext') in bytes.

   * `msgp' : message to be sent. (msgp->mtype must be positive).

   * `msgflg' : IPC_NOWAIT.

   * returns : msgsz on success. -1 on error.

   The message text and type are stored in the internal `msg'
structure. `msg_cbytes', `msg_qnum', `msg_lspid', and `msg_stime'
fields are updated. Readers waiting on the queue are awakened.

Errors:
EACCES : Do not have write permission on queue.
EAGAIN : IPC_NOWAIT specified and queue is full.
EFAULT : msgp not accessible.
EIDRM  : The message queue was removed.
EINTR  : Full queue ... would have slept but ... was interrupted.
EINVAL : mtype < 1, msgsz > MSGMAX, msgsz < 0, msqid < 0 or unused.
ENOMEM : Could not allocate space for header and text.

automatically generated by info2www version 1.2.2.9