[tpm] my perl program seg faults
Tom Legrady
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
a close.
Tom
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
>> say:
>>
>> "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-
>> thread-multi"
>> _______________________________________________
>> toronto-pm mailing list
>> toronto-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/toronto-pm
>
> _______________________________________________
> toronto-pm mailing list
> toronto-pm at pm.org
> http://mail.pm.org/mailman/listinfo/toronto-pm
>
Tom Legrady
tom at legrady.ca
XMas Shopping photos => http://www.flickr.com/photos/89217343@N00/
sets/1601047/show
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20070503/69b4f6fe/attachment.html
More information about the toronto-pm
mailing list