Debian Codegraph @

upstream/debian-unstable/man3/IPC::Msg.3perl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "IPC::Msg 3perl"
58 .TH IPC::Msg 3perl 2025-11-16 "perl v5.40.1" "Perl Programmers Reference Guide"
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 IPC::Msg \- SysV Msg IPC object class
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 .Vb 2
68 \& use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR);
69 \& use IPC::Msg;
70 \&
71 \& $msg = IPC::Msg\->new(IPC_PRIVATE, S_IRUSR | S_IWUSR);
72 \&
73 \& $msg\->snd($msgtype, $msgdata);
74 \&
75 \& $msg\->rcv($buf, 256);
76 \&
77 \& $ds = $msg\->stat;
78 \&
79 \& $msg\->remove;
80 .Ve
81 .SH DESCRIPTION
82 .IX Header "DESCRIPTION"
83 A class providing an object based interface to SysV IPC message queues.
84 .SH METHODS
85 .IX Header "METHODS"
86 .IP "new ( KEY , FLAGS )" 4
87 .IX Item "new ( KEY , FLAGS )"
88 Creates a new message queue associated with \f(CW\*(C`KEY\*(C'\fR. A new queue is
89 created if
90 .RS 4
91 .IP \(bu 4
92 \&\f(CW\*(C`KEY\*(C'\fR is equal to \f(CW\*(C`IPC_PRIVATE\*(C'\fR
93 .IP \(bu 4
94 \&\f(CW\*(C`KEY\*(C'\fR does not already have a message queue associated with
95 it, and \f(CW\*(C`\fR\f(CIFLAGS\fR\f(CW & IPC_CREAT\*(C'\fR is true.
96 .RE
97 .RS 4
98 .Sp
99 On creation of a new message queue \f(CW\*(C`FLAGS\*(C'\fR is used to set the
100 permissions. Be careful not to set any flags that the Sys V
101 IPC implementation does not allow: in some systems setting
102 execute bits makes the operations fail.
103 .RE
104 .IP id 4
105 .IX Item "id"
106 Returns the system message queue identifier.
107 .IP "rcv ( BUF, LEN [, TYPE [, FLAGS ]] )" 4
108 .IX Item "rcv ( BUF, LEN [, TYPE [, FLAGS ]] )"
109 Read a message from the queue. Returns the type of the message read.
110 See \fBmsgrcv\fR\|(2). The BUF becomes tainted.
111 .IP remove 4
112 .IX Item "remove"
113 Remove and destroy the message queue from the system.
114 .IP "set ( STAT )" 4
115 .IX Item "set ( STAT )"
116 .PD 0
117 .IP "set ( NAME => VALUE [, NAME => VALUE ...] )" 4
118 .IX Item "set ( NAME => VALUE [, NAME => VALUE ...] )"
119 .PD
120 \&\f(CW\*(C`set\*(C'\fR will set the following values of the \f(CW\*(C`stat\*(C'\fR structure associated
121 with the message queue.
122 .Sp
123 .Vb 4
124 \& uid
125 \& gid
126 \& mode (oly the permission bits)
127 \& qbytes
128 .Ve
129 .Sp
130 \&\f(CW\*(C`set\*(C'\fR accepts either a stat object, as returned by the \f(CW\*(C`stat\*(C'\fR method,
131 or a list of \fIname\fR\-\fIvalue\fR pairs.
132 .IP "snd ( TYPE, MSG [, FLAGS ] )" 4
133 .IX Item "snd ( TYPE, MSG [, FLAGS ] )"
134 Place a message on the queue with the data from \f(CW\*(C`MSG\*(C'\fR and with type \f(CW\*(C`TYPE\*(C'\fR.
135 See \fBmsgsnd\fR\|(2).
136 .IP stat 4
137 .IX Item "stat"
138 Returns an object of type \f(CW\*(C`IPC::Msg::stat\*(C'\fR which is a sub-class of
139 \&\f(CW\*(C`Class::Struct\*(C'\fR. It provides the following fields. For a description
140 of these fields see you system documentation.
141 .Sp
142 .Vb 12
143 \& uid
144 \& gid
145 \& cuid
146 \& cgid
147 \& mode
148 \& qnum
149 \& qbytes
150 \& lspid
151 \& lrpid
152 \& stime
153 \& rtime
154 \& ctime
155 .Ve
156 .SH "SEE ALSO"
157 .IX Header "SEE ALSO"
158 IPC::SysV, Class::Struct
159 .SH AUTHORS
160 .IX Header "AUTHORS"
161 Graham Barr <[email protected]>,
162 Marcus Holland-Moritz <[email protected]>
163 .SH COPYRIGHT
164 .IX Header "COPYRIGHT"
165 Version 2.x, Copyright (C) 2007\-2013, Marcus Holland-Moritz.
166 .PP
167 Version 1.x, Copyright (c) 1997, Graham Barr.
168 .PP
169 This program is free software; you can redistribute it and/or
170 modify it under the same terms as Perl itself.