Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: flushing shm keys

by Khen1950fx (Canon)
on Jun 07, 2013 at 07:08 UTC ( #1037602=note: print w/ replies, xml ) Need Help??


in reply to flushing shm keys

To flush the key:

#!/usr/bin/perl -l use strict; use warnings; use IPC::SysV qw(IPC_CREAT IPC_RMID); $| = 1; my $key = int( rand(900) ) + 5; my $size = 100; my $id = shmget( $key, $size, &IPC_CREAT | 0777 ); print "creating shm key $id"; print "flushing shm key $id"; shmctl( $id, IPC_RMID, 1 );
You can reset to 0 by putting $id = 0; at the EOF.


Comment on Re: flushing shm keys
Select or Download Code
Re^2: flushing shm keys
by vijesh (Novice) on Jun 07, 2013 at 08:04 UTC

    Thanks you very much.. this works. Vijesh

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1037602]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-09-02 19:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (29 votes), past polls