Content-type: text/html Man page of mq_close

mq_close

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

mq_close - Closes a message queue (P1003.1b)  

SYNOPSIS

#include <mqueue.h>

int mq_close (
mqd_t mqdes);  

PARAMETERS

mqdes
Specifies a message queue descriptor.
 

DESCRIPTION

Closes a message queue. This function removes the association between the message queue descriptor, mqdes, and its open message queue description. When all message queue descriptors associated with an open message queue description have been closed, the associated open message queue description is removed. The message associated with the message queue will then be deleted if mq_unlink was already called, or is called after all processes have closed the queue.  

RETURN VALUES

On successful completion, the function returns the value 0; otherwise, the function returns the value -1 and sets errno to indicate the error.  

ERRORS

The mq_close function fails under the following conditions:

[EBADF]
The mqdes argument is an invalid message queue descriptor.
[EFAULT]
Internal virtual memory error.
 

RELATED INFORMATION

Functions: mq_open(3), mq_unlink(3) delim off


 

Index

NAME
SYNOPSIS
PARAMETERS
DESCRIPTION
RETURN VALUES
ERRORS
RELATED INFORMATION

This document was created by man2html, using the manual pages.
Time: 02:42:15 GMT, October 02, 2010