1MQ_CLOSE(3)                Linux Programmer's Manual               MQ_CLOSE(3)
2
3
4

NAME

6       mq_close - close a message queue descriptor
7

SYNOPSIS

9       #include <mqueue.h>
10
11       int mq_close(mqd_t mqdes);
12
13       Link with -lrt.
14

DESCRIPTION

16       mq_close() closes the message queue descriptor mqdes.
17
18       If  the  calling  process  has  attached  a  notification  request (see
19       (mq_notify(3)) to this message queue via mqdes, then  this  request  is
20       removed, and another process can now attach a notification request.
21

RETURN VALUE

23       On  success  mq_close() returns 0; on error, -1 is returned, with errno
24       set to indicate the error.
25

ERRORS

27       EBADF  The message queue descriptor specified in mqdes is invalid.
28

ATTRIBUTES

30       For  an  explanation  of  the  terms  used   in   this   section,   see
31       attributes(7).
32
33       ┌───────────┬───────────────┬─────────┐
34Interface  Attribute     Value   
35       ├───────────┼───────────────┼─────────┤
36mq_close() │ Thread safety │ MT-Safe │
37       └───────────┴───────────────┴─────────┘

CONFORMING TO

39       POSIX.1-2001, POSIX.1-2008.
40

NOTES

42       All  open  message  queues are automatically closed on process termina‐
43       tion, or upon execve(2).
44

SEE ALSO

46       mq_getattr(3),  mq_notify(3),  mq_open(3),  mq_receive(3),  mq_send(3),
47       mq_unlink(3), mq_overview(7)
48

COLOPHON

50       This  page  is  part of release 5.04 of the Linux man-pages project.  A
51       description of the project, information about reporting bugs,  and  the
52       latest     version     of     this    page,    can    be    found    at
53       https://www.kernel.org/doc/man-pages/.
54
55
56
57Linux                             2017-09-15                       MQ_CLOSE(3)
Impressum