1IPC::Msg(3pm) Perl Programmers Reference Guide IPC::Msg(3pm)
2
3
4
6 IPC::Msg - SysV Msg IPC object class
7
9 use IPC::SysV qw(IPC_PRIVATE S_IRWXU);
10 use IPC::Msg;
11
12 $msg = new IPC::Msg(IPC_PRIVATE, S_IRWXU);
13
14 $msg->snd(pack("l! a*",$msgtype,$msg));
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
33 it, and "FLAGS & IPC_CREAT" is true.
34
35 On creation of a new message queue "FLAGS" is used to set the per‐
36 missions.
37
38 id Returns the system message queue identifier.
39
40 rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
41 Read a message from the queue. Returns the type of the message
42 read. See msgrcv. The BUF becomes tainted.
43
44 remove
45 Remove and destroy the message queue from the system.
46
47 set ( STAT )
48 set ( NAME => VALUE [, NAME => VALUE ...] )
49 "set" will set the following values of the "stat" structure associ‐
50 ated with the message queue.
51
52 uid
53 gid
54 mode (oly the permission bits)
55 qbytes
56
57 "set" accepts either a stat object, as returned by the "stat"
58 method, or a list of name-value pairs.
59
60 snd ( TYPE, MSG [, FLAGS ] )
61 Place a message on the queue with the data from "MSG" and with type
62 "TYPE". See msgsnd.
63
64 stat
65 Returns an object of type "IPC::Msg::stat" which is a sub-class of
66 "Class::Struct". It provides the following fields. For a descrip‐
67 tion of these fields see you system documentation.
68
69 uid
70 gid
71 cuid
72 cgid
73 mode
74 qnum
75 qbytes
76 lspid
77 lrpid
78 stime
79 rtime
80 ctime
81
83 IPC::SysV Class::Struct
84
86 Graham Barr <gbarr@pobox.com>
87
89 Copyright (c) 1997 Graham Barr. All rights reserved. This program is
90 free software; you can redistribute it and/or modify it under the same
91 terms as Perl itself.
92
93
94
95perl v5.8.8 2001-09-21 IPC::Msg(3pm)