Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl dying without a trace

by Anonymous Monk
on Oct 30, 2013 at 17:15 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-04-20 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found