{
    "mode": "perldoc",
    "parameter": "IPC::Msg",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/IPC%3A%3AMsg/json",
    "generated": "2026-06-03T03:36:15Z",
    "synopsis": "use IPC::SysV qw(IPCPRIVATE SIRUSR SIWUSR);\nuse IPC::Msg;\n$msg = IPC::Msg->new(IPCPRIVATE, SIRUSR | SIWUSR);\n$msg->snd($msgtype, $msgdata);\n$msg->rcv($buf, 256);\n$ds = $msg->stat;\n$msg->remove;",
    "sections": {
        "NAME": {
            "content": "IPC::Msg - SysV Msg IPC object class\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use IPC::SysV qw(IPCPRIVATE SIRUSR SIWUSR);\nuse IPC::Msg;\n\n$msg = IPC::Msg->new(IPCPRIVATE, SIRUSR | SIWUSR);\n\n$msg->snd($msgtype, $msgdata);\n\n$msg->rcv($buf, 256);\n\n$ds = $msg->stat;\n\n$msg->remove;\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A class providing an object based interface to SysV IPC message queues.\n",
            "subsections": []
        },
        "METHODS": {
            "content": "new ( KEY , FLAGS )\nCreates a new message queue associated with \"KEY\". A new queue is created if\n\n*   \"KEY\" is equal to \"IPCPRIVATE\"\n\n*   \"KEY\" does not already have a message queue associated with it, and \"*FLAGS* &\nIPCCREAT\" is true.\n\nOn creation of a new message queue \"FLAGS\" is used to set the permissions. Be careful not to\nset any flags that the Sys V IPC implementation does not allow: in some systems setting\nexecute bits makes the operations fail.\n\nid  Returns the system message queue identifier.\n\nrcv ( BUF, LEN [, TYPE [, FLAGS ]] )\nRead a message from the queue. Returns the type of the message read. See msgrcv(2). The BUF\nbecomes tainted.\n\nremove\nRemove and destroy the message queue from the system.\n\nset ( STAT )\nset ( NAME => VALUE [, NAME => VALUE ...] )\n\"set\" will set the following values of the \"stat\" structure associated with the message\nqueue.\n\nuid\ngid\nmode (oly the permission bits)\nqbytes\n\n\"set\" accepts either a stat object, as returned by the \"stat\" method, or a list of\n*name*-*value* pairs.\n\nsnd ( TYPE, MSG [, FLAGS ] )\nPlace a message on the queue with the data from \"MSG\" and with type \"TYPE\". See msgsnd(2).\n\nstat\nReturns an object of type \"IPC::Msg::stat\" which is a sub-class of \"Class::Struct\". It\nprovides the following fields. For a description of these fields see you system\ndocumentation.\n\nuid\ngid\ncuid\ncgid\nmode\nqnum\nqbytes\nlspid\nlrpid\nstime\nrtime\nctime\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "IPC::SysV, Class::Struct\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Graham Barr <gbarr@pobox.com>, Marcus Holland-Moritz <mhx@cpan.org>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Version 2.x, Copyright (C) 2007-2013, Marcus Holland-Moritz.\n\nVersion 1.x, Copyright (c) 1997, Graham Barr.\n\nThis program is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
            "subsections": []
        }
    },
    "summary": "IPC::Msg - SysV Msg IPC object class",
    "flags": [],
    "examples": [],
    "see_also": []
}