IPC::Msg(3pm)
π NAME π
okay so bestie, this is IPC::Msg(3pm) from the Perl Programmers Reference Guide β IPC::Msg is the SysV Msg IPC object class, and it's here to make SysV IPC message queues feel less feral. π
β¨ SYNOPSIS β¨
use IPC::SysV qw(IPC_PRIVATE S_IRUSR S_IWUSR);
use IPC::Msg;
$msg = IPC::Msg->new(IPC_PRIVATE, S_IRUSR | S_IWUSR);
$msg->snd($msgtype, $msgdata);
$msg->rcv($buf, 256);
$ds = $msg->stat;
$msg->remove;
π¦ DESCRIPTION π¦
It's giving object-oriented glow-up: this is a class that gives you an object based interface to SysV IPC message queues. iconic, honestly. π
π METHODS π
π new ( KEY , FLAGS )
Creates a new message queue associated with KEY. A new queue is created if:
KEYis equal toIPC_PRIVATEKEYdoes not already have a message queue associated with it, andFLAGS & IPC_CREATis true.
On creation of a new message queue, FLAGS is used to set the permissions.
β οΈ careful, bestie: do not set any flags that the Sys V IPC implementation does not allow β on some systems, setting execute bits makes the operations fail. not a slay. π
πͺͺ id
Returns the system message queue identifier.
π₯ rcv ( BUF, LEN [, TYPE [, FLAGS ]] )
Reads a message from the queue. Returns the type of the message read. See msgrcv(2). The BUF becomes tainted. iykyk. π
π§Ή remove
Removes and destroys the message queue from the system. bye bestie π
ποΈ set ( STAT ) / set ( NAME => VALUE [, NAME => VALUE ...] )
set will set the following values of the stat structure associated with the message queue:
uidgidmode(only the permission bits)qbytes
set accepts either a stat object, as returned by the stat method, or a list of name-value pairs. flexible queen β¨
π€ snd ( TYPE, MSG [, FLAGS ] )
Places a message on the queue with the data from MSG and with type TYPE. See msgsnd(2). send it, periodt π
π stat
Returns an object of type IPC::Msg::stat, which is a sub-class of Class::Struct. It provides the following fields β for a description of these fields, see your system documentation:
uidgidcuidcgidmodeqnumqbyteslspidlrpidstimertimectime
π SEE ALSO π
IPC::SysVClass::Struct
π AUTHORS π
Graham Barr <gbarr@pobox.com>Marcus Holland-Moritz <mhx@cpan.org>
π COPYRIGHT π
Version 2.x, Copyright (C) 2007-2013, Marcus Holland-Moritz.
Version 1.x, Copyright (c) 1997, Graham Barr.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. fr fr π«Ά
okay that's the whole page, bestie β source/version is perl v5.42.3, dated 2026-11-03. now go make those message queues behave. πβ¨π
π¦ where this page comes from
- alpine 3.24: perl-doc 5.42.3-r0 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms