First, using IPC::Msg, I'd like to detect when a queue grows full. Typically this happens when there are no readers for a queue being written to.This is perl, v5.8.0 built for i386-linux-thread-multi $ uname -r => 2.4.21-37.EL Module id = IPC::Msg CPAN_VERSION 1.00
Second, I would like to list the avaiable queues by name. ipcs(8) reports msqid only:#!/usr/bin/perl use strict; use warnings; use IPC::SysV qw(IPC_CREAT IPC_NOWAIT S_IRWXU S_IRWXG S_IRWXO IPC_SET); use IPC::Msg; my $msg = new IPC::Msg ("QUEUE_42", IPC_CREAT | S_IRWXU | S_IRWXG | S_IRWXO | IPC_ +SET); SEND: while (1) { # exit SEND if $msg->full(); # PSEUDO-CODE ONLY $msg->snd(1, pack("L a*", 1, "Hello World!")); }
How do i get "QUEUE_42" from msgid 163844?$ ipcs -q ------ Message Queues -------- key msqid owner perms used-bytes messages 0x00000000 163844 u92 777 16384 1024
In reply to IPC::Msg - determine if queue is full by andreas1234567
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |