Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Sockets, eval , and DIE

by andal (Friar)
on Apr 22, 2014 at 06:27 UTC ( #1083110=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Sockets, eval , and DIE
in thread Sockets, eval , and DIE

Alternatively, one can use "send" instead of "syswrite". Like this

use Socket qw(MSG_NOSIGNAL); use Errno; my $out = send($sock, $data, MSG_NOSIGNAL); unless(defined $out) { if($!{EPIPE}) { warn("Got broken pipe\n"); } }
In this case SIGPIPE is not provided, only EPIPE system error happens, which allows handling of all errors in single place.


Comment on Re^3: Sockets, eval , and DIE
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2014-07-29 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls