IPC::Shareable issue

Hello,

I'm trying to lock and unlock a variable in shared memory

my $cleanHandler = tie $cleanup_running, 'IPC::Shareable', 'data',
{ 'destroy' => 1, 'create' => 1 };


$cleanHandler->shlock();
$cleanup_running++;
$cleanHandler->shunlock();

Keep getting this error and can't understand the problem.

Use of uninitialized value $ice in substr at /usr/local/share/perl/
5.10.1/IPC/Shareable.pm line 542.#012

Any tips ?

Best regards,
FR


--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
crash82 [ Fr, 07 Januar 2011 13:33 ] [ ID #2052821 ]

Re: IPC::Shareable issue

Hi,

I guess you should not really use IPC::Shareable, it's last release
was ages ago.
It does not succeed tests on a 5.10.x perl:
https://rt.cpan.org/Public/Bug/Display.html?id=3D41401 - and I guess the
patch in this bug report will get it working for you again.

I guess it would be worthwile finding a replacement module for
IPC::Shareable. You can try replacing it with
http://search.cpan.org/~mhx/IPC-SysV-2.03/lib/IPC/SharedMem. pm which
is still being maintained.
--
Mike

On Fri, Jan 7, 2011 at 1:33 PM, crash82 <netriver [at] gmail.com> wrote:
> Hello,
>
> I'm trying to lock and unlock a variable in shared memory
>
> my $cleanHandler =3D tie $cleanup_running, 'IPC::Shareable', 'data',
> { 'destroy' =3D> 1, 'create' =3D> 1 };
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0$cleanHandler->shlock();
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$cleanup_running++=
;
> =C2=A0 =C2=A0 =C2=A0 =C2=A0$cleanHandler->shunlock();
>
> Keep getting this error and can't understand the problem.
>
> Use of uninitialized value $ice in substr at /usr/local/share/perl/
> 5.10.1/IPC/Shareable.pm line 542.#012
>
> Any tips ?
>
> Best regards,
> FR
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
> For additional commands, e-mail: beginners-help [at] perl.org
> http://learn.perl.org/
>
>
>

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Michiel Beijen [ Mo, 10 Januar 2011 13:38 ] [ ID #2052825 ]

Re: IPC::Shareable issue

--0016e64967dc1ed7b804997d4ef4
Content-Type: text/plain; charset=ISO-8859-1

Hello,

My problem was that I was creating the SM variable and after a bit the app
was killing the current process witch destroyed the variable.

Sorry (very long script), and thanks for your help.

FR

On Mon, Jan 10, 2011 at 12:38 PM, Michiel Beijen
<michiel.beijen [at] gmail.com>wrote:

> Hi,
>
> I guess you should not really use IPC::Shareable, it's last release
> was ages ago.
> It does not succeed tests on a 5.10.x perl:
> https://rt.cpan.org/Public/Bug/Display.html?id=41401 - and I guess the
> patch in this bug report will get it working for you again.
>
> I guess it would be worthwile finding a replacement module for
> IPC::Shareable. You can try replacing it with
> http://search.cpan.org/~mhx/IPC-SysV-2.03/lib/IPC/SharedMem. pm<http://search.cpan.org/%7Emhx/IPC-SysV-2.03/lib/IPC/SharedMem.pm>which
> is still being maintained.
> --
> Mike
>
> On Fri, Jan 7, 2011 at 1:33 PM, crash82 <netriver [at] gmail.com> wrote:
> > Hello,
> >
> > I'm trying to lock and unlock a variable in shared memory
> >
> > my $cleanHandler = tie $cleanup_running, 'IPC::Shareable', 'data',
> > { 'destroy' => 1, 'create' => 1 };
> >
> >
> > $cleanHandler->shlock();
> > $cleanup_running++;
> > $cleanHandler->shunlock();
> >
> > Keep getting this error and can't understand the problem.
> >
> > Use of uninitialized value $ice in substr at /usr/local/share/perl/
> > 5.10.1/IPC/Shareable.pm line 542.#012
> >
> > Any tips ?
> >
> > Best regards,
> > FR
> >
> >
> > --
> > To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
> > For additional commands, e-mail: beginners-help [at] perl.org
> > http://learn.perl.org/
> >
> >
> >
>

--0016e64967dc1ed7b804997d4ef4--
crash82 [ Mo, 10 Januar 2011 13:42 ] [ ID #2052909 ]
Perl » gmane.comp.lang.perl.beginners » IPC::Shareable issue

Vorheriges Thema: 1st line of perl script
Nächstes Thema: problems hashing