[tpm] my perl program seg faults
tom at legrady.ca
Thu May 3 17:55:12 PDT 2007
You might need to close STDERR before you open it with a new target.
Maybe it's just me, but I get uncooperative results with I open with
On 3-May-07, at 4:08 PM, Indy Singh wrote:
> I don't have a real answer, but a few hacks that may help.
> Put a print statement at the end of your code so that you know for
> sure whether it is dying at the end or near the end.
> I noticed that dynamic libraries are never unloaded, see if this
> but code at the end of your script helps:
> DynaLoader::dl_unload_file($_) foreach (@DynaLoader::dl_librefs);
> As another hack you could try redirecting STDERR to /dev/null at
> the end of your script. I think something like this may work:
> open (STDERR, ">/dev/null");
> Indy Singh
> IndigoSTAR Software -- www.indigostar.com
> ----- Original Message -----
> From: "Fulko Hew" <fulko.hew at gmail.com>
> To: <tpm at to.pm.org>
> Sent: Thursday, May 03, 2007 3:57 PM
> Subject: [tpm] my perl program seg faults
>> I've posted this to PerlMonks, but I thought I'd throw it out to
>> TPM as well...
>> My latest app, is a forking TCP server/client. It runs fine and does
>> its thing. So I put it into a shell loop, and every once in a while I
>> see it die (near or at the end of processing where its exiting) and
>> "Segmentation fault"
>> My guess is its happening after my app says exit, and Perl is doing
>> its clean up. But I'd rather never see the error message. ISTR that
>> this isn't the first app of mine that randomly emits this message on
>> shutdown, but this time around its anoying me. How can I find out
>> where/why its dying?
>> B.T.W. perl -v says: "This is perl, v5.8.8 built for i386-linux-
>> toronto-pm mailing list
>> toronto-pm at pm.org
> toronto-pm mailing list
> toronto-pm at pm.org
tom at legrady.ca
XMas Shopping photos => http://www.flickr.com/photos/89217343@N00/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the toronto-pm