Paste: using IPC::Shareable

Author: keepguessing
Mode: factor
Date: Wed, 17 Jun 2009 15:09:22
Plain Text |
use strict;
use warnings;
use IPC::Shareable;
my $a ;
my @b; 
my $glue =1; 
for ($glue=1;$glue<=128;$glue++) {
   print "--------------";
   print IPC::Shareable::SHM_BUFSIZ();
   print "---------------";
my %options = ( 
    create    => 1,
    exclusive => 0,
    mode      => 0644,
    destroy   => 1,
    size => 1024
);
eval {
   if($glue ==127) {
      print "break here";
   }   
   $b[$glue-1] = tie $a, 'IPC::Shareable', $glue, { %options };
};
if($@) {
   print $glue." doesnot exists \n";
   
   $b[$glue-2]->remove();
   print $@; 
}else {
   print $glue."  created \n";
}
}

New Annotation

Summary:
Author:
Mode:
Body: