1IPC::Msg(3) User Contributed Perl Documentation IPC::Msg(3)
2
3
4
6 IPC::Msg - SysV Msg IPC object class
7
9 use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR);
10 use IPC::Msg;
11
12 $msg = IPC::Msg->new(IPC_PRIVATE, S_IRUSR | S_IWUSR);
13
14 $msg->snd($msgtype, $msgdata);
15
16 $msg->rcv($buf, 256);
17
18 $ds = $msg->stat;
19
20 $msg->remove;
21
23 A class providing an object based interface to SysV IPC message queues.
24
26 new ( KEY , FLAGS )
27 Creates a new message queue associated with "KEY". A new queue is
28 created if
29
30 · "KEY" is equal to "IPC_PRIVATE"
31
32 · "KEY" does not already have a message queue associated with it,
33 and "FLAGS & IPC_CREAT" is true.
34
35 On creation of a new message queue "FLAGS" is used to set the
36 permissions. Be careful not to set any flags that the Sys V IPC
37 implementation does not allow: in some systems setting execute bits
38 makes the operations fail.
39
40 id Returns the system message queue identifier.
41
42 rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
43 Read a message from the queue. Returns the type of the message
44 read. See msgrcv(2). The BUF becomes tainted.
45
46 remove
47 Remove and destroy the message queue from the system.
48
49 set ( STAT )
50 set ( NAME => VALUE [, NAME => VALUE ...] )
51 "set" will set the following values of the "stat" structure
52 associated with the message queue.
53
54 uid
55 gid
56 mode (oly the permission bits)
57 qbytes
58
59 "set" accepts either a stat object, as returned by the "stat"
60 method, or a list of name-value pairs.
61
62 snd ( TYPE, MSG [, FLAGS ] )
63 Place a message on the queue with the data from "MSG" and with type
64 "TYPE". See msgsnd(2).
65
66 stat
67 Returns an object of type "IPC::Msg::stat" which is a sub-class of
68 "Class::Struct". It provides the following fields. For a
69 description of these fields see you system documentation.
70
71 uid
72 gid
73 cuid
74 cgid
75 mode
76 qnum
77 qbytes
78 lspid
79 lrpid
80 stime
81 rtime
82 ctime
83
85 IPC::SysV, Class::Struct
86
88 Graham Barr <gbarr@pobox.com>, Marcus Holland-Moritz <mhx@cpan.org>
89
91 Version 2.x, Copyright (C) 2007-2013, Marcus Holland-Moritz.
92
93 Version 1.x, Copyright (c) 1997, Graham Barr.
94
95 This program is free software; you can redistribute it and/or modify it
96 under the same terms as Perl itself.
97
98
99
100perl v5.28.0 2016-05-09 IPC::Msg(3)