148 lines
5.1 KiB
HTML
148 lines
5.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>mq_unlink</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="mq_unlink"></a> <a name="tag_03_391"></a><!-- mq_unlink -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_03_391_01"></a>NAME</h4>
|
|
|
|
<blockquote>mq_unlink - remove a message queue (<b>REALTIME</b>)</blockquote>
|
|
|
|
<h4><a name="tag_03_391_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('MSG')">MSG</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> #include <<a href="../basedefs/mqueue.h.html">mqueue.h</a>><br>
|
|
<br>
|
|
int mq_unlink(const char *</tt><i>name</i><tt>); <img src="../images/opt-end.gif" alt="[Option End]" border="0"></tt></code></div>
|
|
|
|
<tt><br>
|
|
</tt></blockquote>
|
|
|
|
<h4><a name="tag_03_391_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>mq_unlink</i>() function shall remove the message queue named by the pathname <i>name</i>. After a successful call to
|
|
<i>mq_unlink</i>() with <i>name</i>, a call to <a href="../functions/mq_open.html"><i>mq_open</i>()</a> with <i>name</i> shall fail
|
|
if the flag O_CREAT is not set in <i>flags</i>. If one or more processes have the message queue open when <i>mq_unlink</i>() is
|
|
called, destruction of the message queue shall be postponed until all references to the message queue have been closed.</p>
|
|
|
|
<p>Calls to <a href="../functions/mq_open.html"><i>mq_open</i>()</a> to recreate the message queue may fail until the message queue
|
|
is actually removed. However, the <i>mq_unlink</i>() call need not block until all references have been closed; it may return
|
|
immediately.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_04"></a>RETURN VALUE</h4>
|
|
|
|
<blockquote>
|
|
<p>Upon successful completion, the function shall return a value of zero. Otherwise, the named message queue shall be unchanged by
|
|
this function call, and the function shall return a value of -1 and set <i>errno</i> to indicate the error.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_05"></a>ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>mq_unlink</i>() function shall fail if:</p>
|
|
|
|
<dl compact>
|
|
<dt>[EACCES]</dt>
|
|
|
|
<dd>Permission is denied to unlink the named message queue.</dd>
|
|
|
|
<dt>[ENAMETOOLONG]</dt>
|
|
|
|
<dd>
|
|
The length of the <i>name</i> argument exceeds {PATH_MAX} or a pathname component is longer than {NAME_MAX}.</dd>
|
|
|
|
<dt>[ENOENT]</dt>
|
|
|
|
<dd>The named message queue does not exist.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_03_391_06"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_07"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_08"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_09"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_10"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="mq_close.html"><i>mq_close</i>()</a> , <a href="mq_open.html"><i>mq_open</i>()</a> , <a href=
|
|
"msgctl.html"><i>msgctl</i>()</a> , <a href="msgget.html"><i>msgget</i>()</a> , <a href="msgrcv.html"><i>msgrcv</i>()</a> , <a
|
|
href="msgsnd.html"><i>msgsnd</i>()</a> , the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/mqueue.h.html"><i><mqueue.h></i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_11"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 5. Included for alignment with the POSIX Realtime Extension.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_03_391_12"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>mq_unlink</i>() function is marked as part of the Message Passing option.</p>
|
|
|
|
<p>The Open Group Corrigendum U021/5 is applied, clarifying that upon unsuccessful completion, the named message queue is unchanged
|
|
by this function.</p>
|
|
|
|
<p>The [ENOSYS] error condition has been removed as stubs need not be provided if an implementation does not support the Message
|
|
Passing option.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|