IPC::ShareLite

2002-01-31 Thread Rasoul Hajikhani

Folks,
I have created a data structure and used IPC::ShareLite to save it in
the main memeory. Can someone tell me how to look at it and destroy it.
Thanks
-r



Re: IPC::ShareLite

2002-01-31 Thread Sam Tregar

On Thu, 31 Jan 2002, Rasoul Hajikhani wrote:

 I have created a data structure and used IPC::ShareLite to save it in
 the main memeory. Can someone tell me how to look at it and destroy it.

Your system should have a program called ipcs you can use to examine IPC
shared structures (memory, semaphores and message queues).  Look at the
ipcs manpage for details.

-sam





IPC::ShareLite 0.07a test problems

2000-06-27 Thread Christian Gilmore

Hey, I realize this problem isn't directly mod-perl related, but I'm trying
to build the most up-to-date version of perl/apache/etc to continue
debugging the problem I'm having with set_handlers() (see other recent
thread). I'm using IPC::Cache (which of course relies on IPC::ShareLite)
within an AuthzCache module.

I'm finding test errors in IPC::ShareLite-0.07a under solaris
2.5.1/perl-5.6.0. Below is the output of a gdb on the test. Has anyone
successfully compiled and tested ShareLite in a similar environment?

Regards,
Christian

cougar% gdb perl-5.60
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.5.1"...
(gdb) set args test.pl
(gdb) r
Starting program: /opt/gnu/bin/perl-5.60 test.pl
1..8
ok 1
ok 2
ok 3
not ok 4
ok 5
ok 6
not ok 7
Bad realloc() ignored at
/opt/gnu/depot/perl-5.6.0/lib/site_perl/sun4-solaris/IPC/ShareLite.pm line
106.

Program received signal SIGSEGV, Segmentation fault.
0x79568 in Perl_sv_usepvn ()
(gdb) share
Symbols already loaded for /usr/lib/libsocket.so.1
Symbols already loaded for /usr/lib/libnsl.so.1
Symbols already loaded for /usr/lib/libdl.so.1
Symbols already loaded for /usr/lib/libm.so.1
Symbols already loaded for /usr/lib/libc.so.1
Symbols already loaded for /usr/lib/libsec.so.1
Symbols already loaded for /usr/lib/libintl.so.1
Symbols already loaded for /usr/lib/libmp.so.1
Symbols already loaded for /usr/lib/libw.so.1
Symbols already loaded for
/opt/gnu/depot/perl-5.6.0/lib/site_perl/sun4-solaris/auto/IPC/ShareLite/Shar
eLite.so
(gdb) bt
#0  0x79568 in Perl_sv_usepvn ()
#1  0xef58327c in XS_IPC__ShareLite_read_share (cv=0x161f80)
at ShareLite.xs:314
#2  0x73114 in Perl_pp_entersub ()
#3  0x6c0cc in Perl_runops_standard ()
#4  0x23eb0 in S_run_body ()
#5  0x23b18 in perl_run ()
#6  0x2115c in main ()

-
Christian Gilmore
Infrastructure  Tools Team Lead
Web  Multimedia Development
Tivoli Systems, Inc.




IPC::ShareLite with 5.6

2000-03-28 Thread Paul G. Weiss

I have been unsuccessful in building IPC::ShareLite,
which is used by HTML::Template under 5.6.  Two problems:

(1) It won't build at all w/o adding 
#define PERL_POLLUTE 

before the 
 
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

in ShareLite.xs.

(2) After building it, test fails:

1..8
ok 1
ok 2
ok 3
Bad realloc() ignored at
/usrl1/home/pweiss/perl-56/lib/site_perl/5.6.0/sun4-solaris/IPC/ShareLite.pm
line 111.
Segmentation Fault (core dumped)


This also occurs if I build the extension under 5.00503 and run in under
5.6.  

Can anyone confirm this problem and suggest a workaround?

-Paul



IPC::ShareLite and garbage collection

2000-01-11 Thread Dave Hodson

I'm trying to implement IPC::ShareLite on a Red Hat Linux box. I've
successfully stored/fetched the data I want between proc's, and am now
attempting to "clean up" once the httpd is killed/restarted.

Anyone has a good suggestion on how to do this? The POD for ShareLite
doesn't address this topic.

--
Dave Hodson
Vice President of Technology
iPrint, inc
Voice: 650 298.8500 x2480Fax: 650 364.7724
Email: [EMAIL PROTECTED]
Visit iPrint at http://www.iPrint.com




Re: IPC::ShareLite and garbage collection

2000-01-11 Thread Mark Doyle

 From: "Dave Hodson" [EMAIL PROTECTED]
 Date: 2000-01-11 09:12:32 -0500

 I'm trying to implement IPC::ShareLite on a Red Hat Linux box. I've
 successfully stored/fetched the data I want between proc's, and am now
 attempting to "clean up" once the httpd is killed/restarted.

 Anyone has a good suggestion on how to do this? The POD for ShareLite
 doesn't address this topic.

I store a hash to share cached authentication information amongst the httpd  
children using ShareLite and when I want to clean it up I just run a perl  
script that uses the same key as the mod_perl modules that create and access  
the stored hash and store an empty hash wiping out what was there, something  
like:

#!/usr/local/bin/perl -w
use strict;
use IPC::ShareLite;
use Storable qw(freeze);

my $share_ip = IPC::ShareLite-new(-key = '', -create = 'no', -mode = 0666);
$share_ip-store(freeze ({}));

Cheers,
Mark



Re: IPC::ShareLite and garbage collection

2000-01-11 Thread Sam Tregar

On Tue, 11 Jan 2000, Dave Hodson wrote:

 I'm trying to implement IPC::ShareLite on a Red Hat Linux box. I've
 successfully stored/fetched the data I want between proc's, and am now
 attempting to "clean up" once the httpd is killed/restarted.
 
 Anyone has a good suggestion on how to do this? The POD for ShareLite
 doesn't address this topic.

Basically, you can delete an IPC::ShareLite segment 'FOOO' like this:

{ 
   my $share = IPC::ShareLite-new('-key' = 'FOOO', '-create' = 0, 
   '-destroy' = 1);
}

Since destroy is set true the segment is deleted when $share goes out of
scope.  As for where this code should go in your application, I think
you'll need to figure that out.

Of course, if you're only interested in doing it manually, 'ipcs' and
'ipcrm' are what you're looking for.

-sam