Pardon the off topic thread,
I am trying to make IPC::Shareable work with my script, however I get
this error:
IPC::Shareable::SharedMem: shmget: Permission denied
 at /usr/local/lib/perl5/site_perl/5.005/IPC/Shareable.pm line 456
[Tue Oct 16 14:44:15 2001] [error] Could not create shared memory
segment: Permission denied
Does any one know what's up?

Here is how I am using it to set:

unless (defined(%WEBACCESS) && tied(%WEBACCESS))
{
        die "Could not bind shared memory: $!" unless
        tie %WEBACCESS, 'IPC::Shareable', 'randh_webaccess', {create =>1, mode
=> 0666};      }

        tied(%WEBACCESS)->shlock;

        my $user                        = $WEBACCESS{$code};
        unless ($user)
        {

     $WEBACCESS{$code}       = {access_level => $status, access =>
$entities, time =>$time};
        }

        tied(%WEBACCESS)->shunlock;

And to read it:

tie %WEBACCESS, 'IPC::Shareable', 'randh_webaccess' unless
(defined(%WEBACCESS) && tied(%WEBACCESS));

        tied(%WEBACCESS)->shlock;

        my $info                = $WEBACCESS{$user};

        tied(%WEBACCESS)->shunlock;

Any help will be greatly appreciated.
Thanks
-r

Reply via email to