1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
|
.TH CMDIPC 1 CMDIPC
.SH NAME
cmdipc - System V and POSIX IPC from the command line
.SH SYNOPSIS
.B cmdipc
\-Q
.RI [ OPTION ]...\ [receive]
.br
.B cmdipc
\-Q
.RI [ OPTION ]...\ send
[\-\-]
.I MESSAGE
.br
.B cmdipc
\-S
.RI [ OPTION ]...\ [p|v|z|read]
.br
.B cmdipc
\-S
.RI [ OPTION ]...\ set
.I VALUE
.br
.B cmdipc
\-M
.RI [ OPTION ]...\ [read]
.br
.B cmdipc
\-M
.RI [ OPTION ]...\ write
[\-\-]
.I DATA
.br
.B cmdipc
\-X
.RI [ OPTION ]...\ [enter|leave]
.br
.B cmdipc
\-C
.RI [ OPTION ]...\ [enter|leave|wait]
.br
.B cmdipc
\-C
.RI [ OPTION ]...\ notify
[all]
.br
.B cmdipc
\-C
.RI [ OPTION ]...\ broadcast
.br
.B cmdipc
\-B
.RI [ OPTION ]...\ THRESHOLD
[enter]
.br
.B cmdipc
\-B
.RI [ OPTION ]...\ --remove
.br
.B cmdipc
\-L
.RI [ OPTION ]...\ [shared\ [un]lock]
.br
.B cmdipc
\-L
.RI [ OPTION ]...\ exclusive\ [un]lock
.br
.B cmdipc
\-R
.RI [ OPTION ]...\ [\-\-]
.RI [ MESSAGE ]
.br
.B cmdipc
\-\-ftok
.I PATH
.I ID
.SH DESCRIPTION
System V and POSIX interprocess communication from the command
line. In addition to the primities shared memory, message queue
and semaphores, this tool can from these primitives construct
mutexes, conditions, barriers, shared locks and rendezvous.
.SH OPTIONS
.TP
.BR \-h ,\ \-\-help
Prints this help message and exits.
.TP
.BR \-k ,\ \-\-key \ \fIKEY\fP
The key (SysV) or name (POSIX) of the item.
.TP
.BR \-m ,\ \-\-mode \ \fIOCTAL\fP
The mode for the item.
.TP
.BR \-s ,\ \-\-size \ \fISIZE\fP
Maximum size for messages.
.TP
.BR \-z ,\ \-\-spool \ \fISIZE\fP
Maximum number of messages.
.TP
.BR \-t ,\ \-\-type \ \fITYPE\fP
Message type.
.TP
.BR \-p ,\ \-\-priority \ \fIPRIO\fP
Message priority.
.TP
.BR \-d ,\ \-\-delta \ \fIDELTA\fP
Semaphore value increment.
.TP
.BR \-i ,\ \-\-initial \ \fIVALUE\fP
Initial semaphore value.
.TP
.BR \-b ,\ \-\-timeout \ \fISECS\fP
Semaphore V/Z timeout, in seconds.
.TP
.BR \-l ,\ \-\-length \ \fILEN\fP
Shared memory read length.
.TP
.BR \-o ,\ \-\-offset \ \fIOFF\fP
Shared memory read/write offset.
.TP
.BR \-r ,\ \-\-remove
Remove unit.
.TP
.BR \-n ,\ \-\-nonblocking
Do not block, exit with 2 if busy.
.TP
.BR \-c ,\ \-\-create
Create item.
.TP
.BR \-x ,\ \-\-exclusive
Create exclusive item.
.TP
.BR \-f ,\ \-\-ftok
Create unit ID, possibly non-unique.
.TP
.BR \-P ,\ \-\-posix
Use POSIX IPC rather than System V IPC.
.TP
.BR \-Q ,\ \-\-mqueue
Use message queue.
.TP
.BR \-S ,\ \-\-semaphore
Use semaphore.
.TP
.BR \-M ,\ \-\-shm
Use shared memory.
.TP
.BR \-X ,\ \-\-mutex
Use mutex.
.TP
.BR \-C ,\ \-\-condition
Use condition.
.TP
.BR \-B ,\ \-\-barrier
Use barrier.
.TP
.BR \-L ,\ \-\-shared-lock
Use shared lock.
.TP
.BR \-R ,\ \-\-rendezvous
Use rendezvous.
.SH RATIONALE
Interprocess communication in the command line enables much
more interesting use of shell scripts.
.SH "SEE ALSO"
.BR bus (1),
.BR ipcs (1),
.BR ipcrm (1),
.BR ipcmk (1),
.BR flock (1),
.BR mkfifo (1),
.BR ipcmd
.PP
Full documentation available locally via: info \(aq(cmdipc)\(aq
.SH AUTHORS
Principal author, Mattias Andrée. See the COPYING file for the full
list of authors.
.SH LICENSE
Copyright \(co 2014, 2015 Mattias Andrée
.br
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
.br
This is free software: you are free to change and redistribute it.
.br
There is NO WARRANTY, to the extent permitted by law.
.SH BUGS
Please report bugs to m@maandree.se
|