logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

mq_unlink.3p (3776B)


  1. '\" et
  2. .TH MQ_UNLINK "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. mq_unlink
  12. \(em remove a message queue
  13. (\fBREALTIME\fP)
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <mqueue.h>
  18. .P
  19. int mq_unlink(const char *\fIname\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fImq_unlink\fR()
  24. function shall remove the message queue named by the string name.
  25. If one or more processes have the message queue open when
  26. \fImq_unlink\fR()
  27. is called, destruction of the message queue shall be postponed until
  28. all references to the message queue have been closed. However, the
  29. \fImq_unlink\fR()
  30. call need not block until all references have been closed; it may return
  31. immediately.
  32. .P
  33. After a successful call to
  34. \fImq_unlink\fR(),
  35. reuse of the name shall subsequently cause
  36. \fImq_open\fR()
  37. to behave as if no message queue of this name exists (that is,
  38. \fImq_open\fR()
  39. will fail if O_CREAT is not set, or will create a new message queue if
  40. O_CREAT is set).
  41. .SH "RETURN VALUE"
  42. Upon successful completion, the function shall return a value of zero.
  43. Otherwise, the named message queue shall be unchanged by this function
  44. call, and the function shall return a value of \-1 and set
  45. .IR errno
  46. to indicate the error.
  47. .SH ERRORS
  48. The
  49. \fImq_unlink\fR()
  50. function shall fail if:
  51. .TP
  52. .BR EACCES
  53. Permission is denied to unlink the named message queue.
  54. .TP
  55. .BR EINTR
  56. The call to
  57. \fImq_unlink\fR()
  58. blocked waiting for all references to the named message queue to be
  59. closed and a signal interrupted the call.
  60. .TP
  61. .BR ENOENT
  62. The named message queue does not exist.
  63. .P
  64. The
  65. \fImq_unlink\fR()
  66. function may fail if:
  67. .TP
  68. .BR ENAMETOOLONG
  69. .br
  70. The length of the
  71. .IR name
  72. argument exceeds
  73. {_POSIX_PATH_MAX}
  74. on systems that do not support the XSI option
  75. or exceeds
  76. {_XOPEN_PATH_MAX}
  77. on XSI systems,
  78. or has a pathname component that is longer than
  79. {_POSIX_NAME_MAX}
  80. on systems that do not support the XSI option
  81. or longer than
  82. {_XOPEN_NAME_MAX}
  83. on XSI systems.
  84. A call to
  85. \fImq_unlink\fR()
  86. with a
  87. .IR name
  88. argument that contains the same message queue name as was previously
  89. used in a successful
  90. \fImq_open\fR()
  91. call shall not give an
  92. .BR [ENAMETOOLONG]
  93. error.
  94. .LP
  95. .IR "The following sections are informative."
  96. .SH EXAMPLES
  97. None.
  98. .SH "APPLICATION USAGE"
  99. None.
  100. .SH RATIONALE
  101. None.
  102. .SH "FUTURE DIRECTIONS"
  103. A future version might require the
  104. \fImq_open\fR()
  105. and
  106. \fImq_unlink\fR()
  107. functions to have semantics similar to normal file system operations.
  108. .SH "SEE ALSO"
  109. .IR "\fImq_close\fR\^(\|)",
  110. .IR "\fImq_open\fR\^(\|)",
  111. .IR "\fImsgctl\fR\^(\|)",
  112. .IR "\fImsgget\fR\^(\|)",
  113. .IR "\fImsgrcv\fR\^(\|)",
  114. .IR "\fImsgsnd\fR\^(\|)"
  115. .P
  116. The Base Definitions volume of POSIX.1\(hy2017,
  117. .IR "\fB<mqueue.h>\fP"
  118. .\"
  119. .SH COPYRIGHT
  120. Portions of this text are reprinted and reproduced in electronic form
  121. from IEEE Std 1003.1-2017, Standard for Information Technology
  122. -- Portable Operating System Interface (POSIX), The Open Group Base
  123. Specifications Issue 7, 2018 Edition,
  124. Copyright (C) 2018 by the Institute of
  125. Electrical and Electronics Engineers, Inc and The Open Group.
  126. In the event of any discrepancy between this version and the original IEEE and
  127. The Open Group Standard, the original IEEE and The Open Group Standard
  128. is the referee document. The original Standard can be obtained online at
  129. http://www.opengroup.org/unix/online.html .
  130. .PP
  131. Any typographical or formatting errors that appear
  132. in this page are most likely
  133. to have been introduced during the conversion of the source files to
  134. man page format. To report such errors, see
  135. https://www.kernel.org/doc/man-pages/reporting_bugs.html .