mq_close

Section: C Library Functions (3)
Updated: 2026-02-08
Index JM Home Page roff page
 

名前

mq_close - メッセージキュー記述子をクローズする  

ライブラリ

リアルタイムライブラリ (librt,~-lrt)  

書式

#include <mqueue.h>

int mq_close(mqd_t mqdes);
 

説明

mq_close() はメッセージキュー記述子 (message queue descriptor) mqdes をクローズする。

If the calling process has attached a notification request (see mq_notify(3)) to this message queue via mqdes, then this request is removed, and another process can now attach a notification request.  

返り値

成功すると、 mq_close() は 0 を返す。エラーの場合、-1 を返し、 errno にエラーを示す値を設定する。  

エラー

EBADF
mqdes に指定されたメッセージキュー記述子が不正である。
 

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース属性値
mq_close() Thread safetyMT-Safe
 

標準規格

POSIX.1-2008.  

歴史

POSIX.1-2001.  

注意

プロセス終了時、もしくは execve(2) 実行時に、全てのオープンされたメッセージキューは自動的にクローズされる。  

関連項目

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


 

Index

名前
ライブラリ
書式
説明
返り値
エラー
属性
標準規格
歴史
注意
関連項目

This document was created by man2html, using the manual pages.