xref: /src/share/man/man4/mqueuefs.4 (revision 1687d77197c01c6ffd5bb233c7a15c6ebb9319af)
1ae43b1a8SDavid Xu.\" Copyright (c) 2005 David Xu <davidxu@FreeBSD.org>
2ae43b1a8SDavid Xu.\" All rights reserved.
3ae43b1a8SDavid Xu.\"
4ae43b1a8SDavid Xu.\" Redistribution and use in source and binary forms, with or without
5ae43b1a8SDavid Xu.\" modification, are permitted provided that the following conditions
6ae43b1a8SDavid Xu.\" are met:
7ae43b1a8SDavid Xu.\" 1. Redistributions of source code must retain the above copyright
8ae43b1a8SDavid Xu.\"    notice(s), this list of conditions and the following disclaimer as
9ae43b1a8SDavid Xu.\"    the first lines of this file unmodified other than the possible
10ae43b1a8SDavid Xu.\"    addition of one or more copyright notices.
11ae43b1a8SDavid Xu.\" 2. Redistributions in binary form must reproduce the above copyright
12ae43b1a8SDavid Xu.\"    notice(s), this list of conditions and the following disclaimer in
13ae43b1a8SDavid Xu.\"    the documentation and/or other materials provided with the
14ae43b1a8SDavid Xu.\"    distribution.
15ae43b1a8SDavid Xu.\"
16ae43b1a8SDavid Xu.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
17ae43b1a8SDavid Xu.\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18ae43b1a8SDavid Xu.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19ae43b1a8SDavid Xu.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
20ae43b1a8SDavid Xu.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21ae43b1a8SDavid Xu.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22ae43b1a8SDavid Xu.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23ae43b1a8SDavid Xu.\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24ae43b1a8SDavid Xu.\" WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25ae43b1a8SDavid Xu.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26ae43b1a8SDavid Xu.\" EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27ae43b1a8SDavid Xu.\"
28ae43b1a8SDavid Xu.Dd November 30, 2005
29*1687d771SAlexander Ziaee.Dt MQUEUEFS 4
30ae43b1a8SDavid Xu.Os
31ae43b1a8SDavid Xu.Sh NAME
32ae43b1a8SDavid Xu.Nm mqueuefs
33ae43b1a8SDavid Xu.Nd POSIX message queue file system
34ae43b1a8SDavid Xu.Sh SYNOPSIS
358167eab9SRuslan ErmilovTo link into kernel:
36ae43b1a8SDavid Xu.Pp
37c2025a76SJoel Dahl.Cd "options P1003_1B_MQUEUE"
388167eab9SRuslan Ermilov.Pp
398167eab9SRuslan ErmilovTo load as a kernel loadable module:
408167eab9SRuslan Ermilov.Pp
418167eab9SRuslan Ermilov.Dl "kldload mqueuefs"
42ae43b1a8SDavid Xu.Sh DESCRIPTION
43ae43b1a8SDavid XuThe
44ae43b1a8SDavid Xu.Nm
45ae43b1a8SDavid Xumodule will permit the
46ae43b1a8SDavid Xu.Fx
478167eab9SRuslan Ermilovkernel to support
488167eab9SRuslan Ermilov.Tn POSIX
498167eab9SRuslan Ermilovmessage queue.
508167eab9SRuslan ErmilovThe module contains system calls to manipulate
518167eab9SRuslan Ermilov.Tn POSIX
528167eab9SRuslan Ermilovmessage queues.
53ae43b1a8SDavid XuIt also contains a file system to implement a view for all message queues of
548167eab9SRuslan Ermilovthe system.
558167eab9SRuslan ErmilovThis helps users to keep track of their message queues and make
56ae43b1a8SDavid Xuit more easily usable without having to invent additional tools.
57ae43b1a8SDavid Xu.Pp
588167eab9SRuslan ErmilovThe most common usage is as follows:
59ae43b1a8SDavid Xu.Pp
60ae43b1a8SDavid Xu.Dl "mount -t mqueuefs null /mnt/mqueue"
61ae43b1a8SDavid Xu.Pp
62ae43b1a8SDavid Xuwhere
63ae43b1a8SDavid Xu.Pa /mnt/mqueue
64ae43b1a8SDavid Xuis a mount point.
65ae43b1a8SDavid Xu.Pp
66ae43b1a8SDavid XuIt is possible to define an entry in
67ae43b1a8SDavid Xu.Pa /etc/fstab
68ae43b1a8SDavid Xuthat looks similar to:
69ae43b1a8SDavid Xu.Bd -literal
70ae43b1a8SDavid Xunull	/mnt/mqueue	mqueuefs	rw	0	0
71ae43b1a8SDavid Xu.Ed
72ae43b1a8SDavid Xu.Pp
738167eab9SRuslan ErmilovThis will mount
748167eab9SRuslan Ermilov.Nm
758167eab9SRuslan Ermilovat the
76ae43b1a8SDavid Xu.Pa /mnt/mqueue
77ae43b1a8SDavid Xumount point during system boot.
78ae43b1a8SDavid XuUsing
79ae43b1a8SDavid Xu.Pa /mnt/mqueue
80ae43b1a8SDavid Xuas a permanent mount point is not advised as its intention
81ae43b1a8SDavid Xuhas always been to be a temporary mount point.
82ae43b1a8SDavid XuSee
83ae43b1a8SDavid Xu.Xr hier 7
84ae43b1a8SDavid Xufor more information on
85ae43b1a8SDavid Xu.Fx
86ae43b1a8SDavid Xudirectory layout.
87ae43b1a8SDavid Xu.Pp
888167eab9SRuslan ErmilovSome common tools can be used on the file system, e.g.:
89ae43b1a8SDavid Xu.Xr cat 1 ,
90ae43b1a8SDavid Xu.Xr chmod 1 ,
91ae43b1a8SDavid Xu.Xr chown 8 ,
92ae43b1a8SDavid Xu.Xr ls 1 ,
93ae43b1a8SDavid Xu.Xr rm 1 ,
948167eab9SRuslan Ermilovetc.
958167eab9SRuslan ErmilovTo use only the message queue system calls, it is not necessary for
96ae43b1a8SDavid Xuuser to mount the file system, just load the module or compile it
978167eab9SRuslan Ermilovinto the kernel.
988167eab9SRuslan ErmilovManually creating a file, for example,
998167eab9SRuslan Ermilov.Dq Li "touch /mnt/mqueue/myqueue" ,
1008167eab9SRuslan Ermilovwill create a message queue named
1018167eab9SRuslan Ermilov.Pa myqueue
1028167eab9SRuslan Ermilovin the kernel, default
1038167eab9SRuslan Ermilovmessage queue attributes will be applied to the queue.
1048167eab9SRuslan ErmilovIt is not
1058167eab9SRuslan Ermilovadvised to use this method to create a queue;
1068167eab9SRuslan Ermilovit is better to use the
107ae43b1a8SDavid Xu.Xr mq_open 2
1088167eab9SRuslan Ermilovsystem call to create a queue as it
1098167eab9SRuslan Ermilovallows the user to specify different attributes.
110ae43b1a8SDavid Xu.Pp
111ae43b1a8SDavid XuTo see the queue's attributes, just read the file:
112ae43b1a8SDavid Xu.Pp
1138167eab9SRuslan Ermilov.Dl "cat /mnt/mqueue/myqueue"
114ae43b1a8SDavid Xu.Sh SEE ALSO
1158167eab9SRuslan Ermilov.Xr mq_open 2 ,
116f44db669SMaxim Konovalov.Xr nmount 2 ,
117ae43b1a8SDavid Xu.Xr unmount 2 ,
118ae43b1a8SDavid Xu.Xr mount 8 ,
1198167eab9SRuslan Ermilov.Xr umount 8
120ae43b1a8SDavid Xu.Sh AUTHORS
121ae43b1a8SDavid XuThis manual page was written by
122a63d6c94SBaptiste Daroussin.An David Xu Aq Mt davidxu@FreeBSD.org .
123