Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: perl dying without a trace

by Anonymous Monk
on Oct 30, 2013 at 17:15 UTC ( #1060398=note: print w/replies, xml ) Need Help??

in reply to perl dying without a trace

If it means anything. I have the same exact same issue:
#perl, v5.8.8 built for x86_64-linux-thread-multi _debug( "WRITE to sock (" . length($tmData) . ")); my $bytesWrote = $itosSock->syswrite($tmData); #perl signals SIGPIPE with a return code 141 (will not execute the nex +t line) _debug( "WROTE ($bytesWrote) to sock" ); # I use socat as the client-side and it closes.
Looking for a work around or fix.

Replies are listed 'Best First'.
Re^2: perl dying without a trace
by Crackers2 (Parson) on Oct 30, 2013 at 19:04 UTC

    See my response to diatolevi. You have to add a SIGPIPE handler to your code.

    Mine is as simple as:

    $SIG{PIPE} = sub { print STDERR "SIGPIPE @_\n"; };

    Which basically just ignores the SIGPIPE and leaves it to you to handle the error after the syswrite

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1060398]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2022-10-02 21:40 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (13 votes). Check out past polls.