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

Reply via email to