Rechercher une page de manuel
mq_close
Langue: en
Version: DECEMBER 2002 (mandriva - 01/05/08)
Section: 2 (Appels système)
NAME
mq_close - close a message queueSYNOPSIS
gcc [ flag... ] file ... -lmqueue [ library... ]#include <mqueue.h>
int mq_close(mqd_t mqdes);
DESCRIPTION
The mq_close() function removes the association between the message queue descriptor, mqdes, and its message queue. The results of using this message queue descriptor after successful return from this mq_close(), and until the return of this message queue descriptor from a subsequent mq_open(), are undefined.If the process has successfully attached a notification request to the message queue via this mqdes, this attachment is removed and the message queue is available for another process to attach for notification.
RETURN VALUES
Upon successful completion, mq_close() returns 0; otherwise, the function returns -1 and sets errno to indicate the error condition.DIAGNOSTICS
The mq_close() function will fail if:- EBADF
- The mqdes argument is an invalid message queue descriptor. But see NOTES below.
- EINTR
- The mq_close() call was interrupted by a signal.
NOTES
There is no difference in case of close operation between message queue and a regular file. In particular you can close a queue with close() or close regular file descriptor with mq_close(). The latter behaviour is a slight violation of POSIX standard.AUTHORS
Krzysztof Benedyczak <golbi@mat.uni.torun.pl>Michal Wronski <wrona@mat.uni.torun.pl>
CONFORMING TO
IEEE Std 1003.1-2001SEE ALSO
mq_open(2)Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre