Debian Codegraph @

upstream/opensuse-tumbleweed/man3/IPC::Msg.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (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 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "IPC::Msg 3pm"
61 .TH IPC::Msg 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 IPC::Msg \- SysV Msg IPC object class
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 2
71 \& use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR);
72 \& use IPC::Msg;
73 \&
74 \& $msg = IPC::Msg\->new(IPC_PRIVATE, S_IRUSR | S_IWUSR);
75 \&
76 \& $msg\->snd($msgtype, $msgdata);
77 \&
78 \& $msg\->rcv($buf, 256);
79 \&
80 \& $ds = $msg\->stat;
81 \&
82 \& $msg\->remove;
83 .Ve
84 .SH DESCRIPTION
85 .IX Header "DESCRIPTION"
86 A class providing an object based interface to SysV IPC message queues.
87 .SH METHODS
88 .IX Header "METHODS"
89 .IP "new ( KEY , FLAGS )" 4
90 .IX Item "new ( KEY , FLAGS )"
91 Creates a new message queue associated with \f(CW\*(C`KEY\*(C'\fR. A new queue is
92 created if
93 .RS 4
94 .IP \(bu 4
95 \&\f(CW\*(C`KEY\*(C'\fR is equal to \f(CW\*(C`IPC_PRIVATE\*(C'\fR
96 .IP \(bu 4
97 \&\f(CW\*(C`KEY\*(C'\fR does not already have a message queue associated with
98 it, and \f(CW\*(C`\fR\f(CIFLAGS\fR\f(CW & IPC_CREAT\*(C'\fR is true.
99 .RE
100 .RS 4
101 .Sp
102 On creation of a new message queue \f(CW\*(C`FLAGS\*(C'\fR is used to set the
103 permissions. Be careful not to set any flags that the Sys V
104 IPC implementation does not allow: in some systems setting
105 execute bits makes the operations fail.
106 .RE
107 .IP id 4
108 .IX Item "id"
109 Returns the system message queue identifier.
110 .IP "rcv ( BUF, LEN [, TYPE [, FLAGS ]] )" 4
111 .IX Item "rcv ( BUF, LEN [, TYPE [, FLAGS ]] )"
112 Read a message from the queue. Returns the type of the message read.
113 See \fBmsgrcv\fR\|(2). The BUF becomes tainted.
114 .IP remove 4
115 .IX Item "remove"
116 Remove and destroy the message queue from the system.
117 .IP "set ( STAT )" 4
118 .IX Item "set ( STAT )"
119 .PD 0
120 .IP "set ( NAME => VALUE [, NAME => VALUE ...] )" 4
121 .IX Item "set ( NAME => VALUE [, NAME => VALUE ...] )"
122 .PD
123 \&\f(CW\*(C`set\*(C'\fR will set the following values of the \f(CW\*(C`stat\*(C'\fR structure associated
124 with the message queue.
125 .Sp
126 .Vb 4
127 \& uid
128 \& gid
129 \& mode (oly the permission bits)
130 \& qbytes
131 .Ve
132 .Sp
133 \&\f(CW\*(C`set\*(C'\fR accepts either a stat object, as returned by the \f(CW\*(C`stat\*(C'\fR method,
134 or a list of \fIname\fR\-\fIvalue\fR pairs.
135 .IP "snd ( TYPE, MSG [, FLAGS ] )" 4
136 .IX Item "snd ( TYPE, MSG [, FLAGS ] )"
137 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.
138 See \fBmsgsnd\fR\|(2).
139 .IP stat 4
140 .IX Item "stat"
141 Returns an object of type \f(CW\*(C`IPC::Msg::stat\*(C'\fR which is a sub\-class of
142 \&\f(CW\*(C`Class::Struct\*(C'\fR. It provides the following fields. For a description
143 of these fields see you system documentation.
144 .Sp
145 .Vb 12
146 \& uid
147 \& gid
148 \& cuid
149 \& cgid
150 \& mode
151 \& qnum
152 \& qbytes
153 \& lspid
154 \& lrpid
155 \& stime
156 \& rtime
157 \& ctime
158 .Ve
159 .SH "SEE ALSO"
160 .IX Header "SEE ALSO"
161 IPC::SysV, Class::Struct
162 .SH AUTHORS
163 .IX Header "AUTHORS"
164 Graham Barr <[email protected]>,
165 Marcus Holland\-Moritz <[email protected]>
166 .SH COPYRIGHT
167 .IX Header "COPYRIGHT"
168 Version 2.x, Copyright (C) 2007\-2013, Marcus Holland\-Moritz.
169 .PP
170 Version 1.x, Copyright (c) 1997, Graham Barr.
171 .PP
172 This program is free software; you can redistribute it and/or
173 modify it under the same terms as Perl itself.