Standard C Library Functions mqunlink(3C)
NAME
mqunlink - remove a message queue
SYNOPSIS
#include
int mqunlink(const char *name);
DESCRIPTION
The mqunlink() function removes the message queue named by
the pathname name. After a successful call to mqunlink()
with name, a call to mqopen(3C) with name fails if the flag
OCREAT is not set in flags. If one or more processes have
the message queue open when mqunlink() is called, destruc-
tion of the message queue is postponed until all references
to the message queue have been closed. Calls to mqopen(3C)
to re-create the message queue may fail until the message
queue is actually removed. However, the mqunlink() call
need not block until all references have been closed; it may
return immediately.
RETURN VALUES
Upon successful completion, mqunlink() returns 0; other-
wise, the named message queue is not changed by this func-
tion call, the function returns -1 and sets errno to indi-
cate the error.
ERORS
The mqunlink() function will fail if:
EACES Permission is denied to unlink the named
message queue.
ENAMETOLONG The length of the name string exceeds
PATHMAX, or a pathname component is longer
than NAMEMAX while POSIXNOTRUNC is in
effect.
ENOENT The named message queue, name, does not
exist.
ENOSYS mqunlink() is not supported by the system.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 5 Feb 2008 1
Standard C Library Functions mqunlink(3C)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Committed
MT-Level MT-Safe
Standard See standards(5).
SEE ALSO
mqueue.h(3HEAD), mqclose(3C), mqopen(3C), attributes(5),
standards(5)
NOTES
Solaris 2.6 was the first release to support the Asynchro-
nous Input and Output option. Prior to this release, this
function always returned -1 and set errno to ENOSYS.
SunOS 5.11 Last change: 5 Feb 2008 2
|