1mq_close(3C)             Standard C Library Functions             mq_close(3C)
2
3
4

NAME

6       mq_close - close a message queue
7

SYNOPSIS

9       #include <mqueue.h>
10
11       int mq_close(mqd_t mqdes);
12
13

DESCRIPTION

15       The  mq_close()  function  removes  the association between the message
16       queue descriptor, mqdes, and its message queue. The  results  of  using
17       this  message  queue  descriptor  after  successful  return  from  this
18       mq_close(), and until the return of this message queue descriptor  from
19       a subsequent mq_open(3C), are undefined.
20
21
22       If  the  process  (or  thread) has successfully attached a notification
23       request to the message queue via this mqdes, this attachment is removed
24       and  the  message  queue is available for another process to attach for
25       notification.
26

RETURN VALUES

28       Upon successful completion, mq_close() returns 0; otherwise, the  func‐
29       tion returns −1 and sets errno to indicate the error condition.
30

ERRORS

32       The  mq_close() function will fail if:
33
34       EBADF      The mqdes argument is an invalid message queue descriptor.
35
36
37       ENOSYS     The mq_open() function is not supported by the system.
38
39

ATTRIBUTES

41       See attributes(5) for descriptions of the following attributes:
42
43
44
45
46       ┌─────────────────────────────┬─────────────────────────────┐
47ATTRIBUTE TYPE               ATTRIBUTE VALUE              
48       ├─────────────────────────────┼─────────────────────────────┤
49       │Interface Stability          │Committed                    │
50       ├─────────────────────────────┼─────────────────────────────┤
51       │MT-Level                     │MT-Safe                      │
52       ├─────────────────────────────┼─────────────────────────────┤
53       │Standard                     │See standards(5).            │
54       └─────────────────────────────┴─────────────────────────────┘
55

SEE ALSO

57       mqueue.h(3HEAD),     mq_notify(3C),     mq_open(3C),     mq_unlink(3C),
58       attributes(5), standards(5)
59

NOTES

61       Solaris 2.6 was the first release to support the Asynchronous Input and
62       Output  option. Prior to this release, this function always returned −1
63       and set errno to ENOSYS.
64
65
66
67SunOS 5.11                        5 Feb 2008                      mq_close(3C)
Impressum