Subject: | [PATCH] fix for interrupted system call in IPC::Run::_read |
Hello,
On one of our boxes I have a problem with IPC::Run dying in IPC::Run::_read with message about interrupted system call.
Patch below fixes the problem:
german@comp1833mhz:~$ diff -u Run.pm.orig Run.pm
--- Run.pm.orig Thu Apr 1 16:52:06 2004
+++ Run.pm Thu Apr 1 16:51:54 2004
@@ -1343,7 +1343,8 @@
confess 'undef' unless defined $_[0] ;
my $s = '' ;
my $r = POSIX::read( $_[0], $s, 10_000 ) ;
- croak "$!: read( $_[0] )" unless $r ;
+ croak "$!: read( $_[0] )" if not($r) and $! != POSIX::EINTR;
+ $r ||= 0;
_debug "read( $_[0] ) = $r chars '$s'" if _debugging_data ;
return $s ;
}