By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,279 Members | 1,680 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,279 IT Pros & Developers. It's quick & easy.

Help required in IPC::Sharelite

gpraghuram
Expert 100+
P: 1,275
Hi,
I have started writing some code using the IPC::Sharelite.
I have written some pieces of code and i tried running the same .
Following is the code

Expand|Select|Wrap|Line Numbers
  1. #!/app/perl5.6/bin/perl
  2. use IPC::ShareLite;
  3.  
  4. my $Shared_Memory_Key = 500;
  5. my $IP_FILE          = "ip.txt";    
  6. my $IC_Count          = 0;
  7.  
  8. my $share_mem_handle = new IPC::ShareLite( -key     => $Shared_Memory_Key,
  9.                                    -create  => 'yes',
  10.                                 -destroy => 'no' ) or die $!;
  11. while(1)
  12. {
  13.     my $full_msg = &getInfoFromFile($IP_FILE);
  14.  
  15.     my $read_info = "";
  16.     share->lock( LOCK_SH );
  17.         if($IC_Count == 5)
  18.         {
  19.             $share_mem_handle->store("DONE");
  20.         }
  21.         else
  22.         {
  23.             $share_mem_handle->store($full_msg);
  24.         }
  25.     share->unlock();
  26.  
  27.     if($IC_Count == 5)
  28.     {
  29.         break;
  30.     }
  31. }

But when i run it i get the following error message
No space left on device at write_to.pl line 8.


Can anybody say me what i am doing worng?

Thanks
Raghuram
Jan 18 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.