xref: /freebsd/share/man/man4/mqueuefs.4 (revision a64729f5077d77e13b9497cb33ecb3c82e606ee8)
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.Dd November 30, 2005
29.Dt MQUEUEFS 4
30.Os
31.Sh NAME
32.Nm mqueuefs
33.Nd POSIX message queue file system
34.Sh SYNOPSIS
35To link into kernel:
36.Pp
37.Cd "options P1003_1B_MQUEUE"
38.Pp
39To load as a kernel loadable module:
40.Pp
41.Dl "kldload mqueuefs"
42.Sh DESCRIPTION
43The
44.Nm
45module will permit the
46.Fx
47kernel to support
48.Tn POSIX
49message queue.
50The module contains system calls to manipulate
51.Tn POSIX
52message queues.
53It also contains a file system to implement a view for all message queues of
54the system.
55This helps users to keep track of their message queues and make
56it more easily usable without having to invent additional tools.
57.Pp
58The most common usage is as follows:
59.Pp
60.Dl "mount -t mqueuefs null /mnt/mqueue"
61.Pp
62where
63.Pa /mnt/mqueue
64is a mount point.
65.Pp
66It is possible to define an entry in
67.Pa /etc/fstab
68that looks similar to:
69.Bd -literal
70null	/mnt/mqueue	mqueuefs	rw	0	0
71.Ed
72.Pp
73This will mount
74.Nm
75at the
76.Pa /mnt/mqueue
77mount point during system boot.
78Using
79.Pa /mnt/mqueue
80as a permanent mount point is not advised as its intention
81has always been to be a temporary mount point.
82See
83.Xr hier 7
84for more information on
85.Fx
86directory layout.
87.Pp
88Some common tools can be used on the file system, e.g.:
89.Xr cat 1 ,
90.Xr chmod 1 ,
91.Xr chown 8 ,
92.Xr ls 1 ,
93.Xr rm 1 ,
94etc.
95To use only the message queue system calls, it is not necessary for
96user to mount the file system, just load the module or compile it
97into the kernel.
98Manually creating a file, for example,
99.Dq Li "touch /mnt/mqueue/myqueue" ,
100will create a message queue named
101.Pa myqueue
102in the kernel, default
103message queue attributes will be applied to the queue.
104It is not
105advised to use this method to create a queue;
106it is better to use the
107.Xr mq_open 2
108system call to create a queue as it
109allows the user to specify different attributes.
110.Pp
111To see the queue's attributes, just read the file:
112.Pp
113.Dl "cat /mnt/mqueue/myqueue"
114.Sh SEE ALSO
115.Xr mq_open 2 ,
116.Xr nmount 2 ,
117.Xr unmount 2 ,
118.Xr mount 8 ,
119.Xr umount 8
120.Sh AUTHORS
121This manual page was written by
122.An David Xu Aq Mt davidxu@FreeBSD.org .
123