K
kath
Hi,
I have a simple script to test variable sharing between two perl
processes,
use IPC::Shareable;
$robj = {status=>'init'};
tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 1, mode
=> 664, destroy => 1};
$pid = fork();
unless(defined $pid){
print "Error durigng fork\n";
}
if($pid){
$robj->{parent=>'parent'};
}else{
tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 0, mode
=> 664, destroy => 0};
$robj->{status} = 'updated';
sleep(5);
exit(0);
}
print "\n", $robj->{status}, "\n";
When i run i get following error.
IPC::Shareable::SharedMem: shmget: Permission denied
at /usr/lib/perl5/site_perl/5.8.3/IPC/Shareable.pm line 566
Could not create shared memory segment:
at test_ipc_shareable.pl line 3
Problem: I get above error when run as user account other than
'root' . But the script used to work before, but started throwing this
error, after server where this script runs was down due to storage
corruption. I am getting this error after server came online.
I am using perl v5.8.3 and IPC::Shareable v0.60. I tried reinstalling
the package, using cpan shell, force make IPC::Shareable', but the
unfortunately 'test IPC::Shareable' fails.
Does any one know how to resolve this? Because running as 'root'
creates other problems for my main scripts.
Thanks in advance,
katharnakh.
I have a simple script to test variable sharing between two perl
processes,
use IPC::Shareable;
$robj = {status=>'init'};
tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 1, mode
=> 664, destroy => 1};
$pid = fork();
unless(defined $pid){
print "Error durigng fork\n";
}
if($pid){
$robj->{parent=>'parent'};
}else{
tie $robj->{status}, 'IPC::Shareable', 'data_glue', {create => 0, mode
=> 664, destroy => 0};
$robj->{status} = 'updated';
sleep(5);
exit(0);
}
print "\n", $robj->{status}, "\n";
When i run i get following error.
IPC::Shareable::SharedMem: shmget: Permission denied
at /usr/lib/perl5/site_perl/5.8.3/IPC/Shareable.pm line 566
Could not create shared memory segment:
at test_ipc_shareable.pl line 3
Problem: I get above error when run as user account other than
'root' . But the script used to work before, but started throwing this
error, after server where this script runs was down due to storage
corruption. I am getting this error after server came online.
I am using perl v5.8.3 and IPC::Shareable v0.60. I tried reinstalling
the package, using cpan shell, force make IPC::Shareable', but the
unfortunately 'test IPC::Shareable' fails.
Does any one know how to resolve this? Because running as 'root'
creates other problems for my main scripts.
Thanks in advance,
katharnakh.