summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod2
1 files changed, 2 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index ba45e557b8..35f840fa33 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -341,7 +341,9 @@ restart system calls on some systems. Using eval/die always works.
eval {
local $SIG{ALRM} = sub { die "alarm\n" }; # NB \n required
+ alarm $timeout;
$nread = sysread SOCKET, $buffer, $size;
+ alarm 0;
};
die if $@ && $@ ne "alarm\n"; # propagate errors
if ($@) {