2 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH mq_close 3 (date) "Linux man-pages (unreleased)"
8 mq_close \- close a message queue descriptor
11 .RI ( librt ", " \-lrt )
14 .B #include <mqueue.h>
16 .BI "int mq_close(mqd_t " mqdes );
20 closes the message queue descriptor
23 If the calling process has attached a notification request (see
25 to this message queue via
27 then this request is removed,
28 and another process can now attach a notification request.
32 returns 0; on error, \-1 is returned, with
34 set to indicate the error.
38 The message queue descriptor specified in
42 For an explanation of the terms used in this section, see
50 Interface Attribute Value
53 T} Thread safety MT-Safe
59 POSIX.1-2001, POSIX.1-2008.
61 All open message queues are automatically closed on process termination,