/share/man/man5/mqueuefs.5

https://bitbucket.org/freebsd/freebsd-head/ · Unknown · 124 lines · 124 code · 0 blank · 0 comment · 0 complexity · 9fb7fa7ff4b959c064f4989a255b4233 MD5 · raw file

  1. .\" Copyright (c) 2005 David Xu <davidxu@FreeBSD.org>
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\" notice(s), this list of conditions and the following disclaimer as
  9. .\" the first lines of this file unmodified other than the possible
  10. .\" addition of one or more copyright notices.
  11. .\" 2. Redistributions in binary form must reproduce the above copyright
  12. .\" notice(s), this list of conditions and the following disclaimer in
  13. .\" the documentation and/or other materials provided with the
  14. .\" distribution.
  15. .\"
  16. .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
  17. .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  18. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19. .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
  20. .\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  21. .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  22. .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
  23. .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  24. .\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
  25. .\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  26. .\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  27. .\"
  28. .\" $FreeBSD$
  29. .\"
  30. .Dd November 30, 2005
  31. .Dt MQUEUEFS 5
  32. .Os
  33. .Sh NAME
  34. .Nm mqueuefs
  35. .Nd POSIX message queue file system
  36. .Sh SYNOPSIS
  37. To link into kernel:
  38. .Pp
  39. .Cd "options P1003_1B_MQUEUE"
  40. .Pp
  41. To load as a kernel loadable module:
  42. .Pp
  43. .Dl "kldload mqueuefs"
  44. .Sh DESCRIPTION
  45. The
  46. .Nm
  47. module will permit the
  48. .Fx
  49. kernel to support
  50. .Tn POSIX
  51. message queue.
  52. The module contains system calls to manipulate
  53. .Tn POSIX
  54. message queues.
  55. It also contains a file system to implement a view for all message queues of
  56. the system.
  57. This helps users to keep track of their message queues and make
  58. it more easily usable without having to invent additional tools.
  59. .Pp
  60. The most common usage is as follows:
  61. .Pp
  62. .Dl "mount -t mqueuefs null /mnt/mqueue"
  63. .Pp
  64. where
  65. .Pa /mnt/mqueue
  66. is a mount point.
  67. .Pp
  68. It is possible to define an entry in
  69. .Pa /etc/fstab
  70. that looks similar to:
  71. .Bd -literal
  72. null /mnt/mqueue mqueuefs rw 0 0
  73. .Ed
  74. .Pp
  75. This will mount
  76. .Nm
  77. at the
  78. .Pa /mnt/mqueue
  79. mount point during system boot.
  80. Using
  81. .Pa /mnt/mqueue
  82. as a permanent mount point is not advised as its intention
  83. has always been to be a temporary mount point.
  84. See
  85. .Xr hier 7
  86. for more information on
  87. .Fx
  88. directory layout.
  89. .Pp
  90. Some common tools can be used on the file system, e.g.:
  91. .Xr cat 1 ,
  92. .Xr chmod 1 ,
  93. .Xr chown 8 ,
  94. .Xr ls 1 ,
  95. .Xr rm 1 ,
  96. etc.
  97. To use only the message queue system calls, it is not necessary for
  98. user to mount the file system, just load the module or compile it
  99. into the kernel.
  100. Manually creating a file, for example,
  101. .Dq Li "touch /mnt/mqueue/myqueue" ,
  102. will create a message queue named
  103. .Pa myqueue
  104. in the kernel, default
  105. message queue attributes will be applied to the queue.
  106. It is not
  107. advised to use this method to create a queue;
  108. it is better to use the
  109. .Xr mq_open 2
  110. system call to create a queue as it
  111. allows the user to specify different attributes.
  112. .Pp
  113. To see the queue's attributes, just read the file:
  114. .Pp
  115. .Dl "cat /mnt/mqueue/myqueue"
  116. .Sh SEE ALSO
  117. .Xr mq_open 2 ,
  118. .Xr nmount 2 ,
  119. .Xr unmount 2 ,
  120. .Xr mount 8 ,
  121. .Xr umount 8
  122. .Sh AUTHORS
  123. This manual page was written by
  124. .An "David Xu" Aq davidxu@FreeBSD.org .