From c67d9135c1e1c4dd5cb9347ede95d3c148398bdb Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 5 Jun 2013 13:58:03 +0000 Subject: [PATCH] Accept ECHILD as meaning the same thing as EAGAIN on sysread/syswrite to accomodate seemingly flawed platform behavior git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16548 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/sbin/xcatd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 84b193a8d..5f3144a43 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -1990,7 +1990,7 @@ sub service_connection { my $bytesread; do { $bytesread=sysread($sock,$line,65536,length($line)) } while ($bytesread); if (length($line)==0) { - if (not defined $bytesread and $! == EAGAIN) { next; } # + if (not defined $bytesread and ($! == EAGAIN or $! == ECHILD)) { next; } # ECHILD makes no sense, but some platform does it last; } $flags=fcntl($sock,F_GETFL,0); @@ -2145,7 +2145,7 @@ sub send_pending_responses { foreach (0..$blocks) { do { syswrite($sock,$resp,4096,$_*4096); - } while ($! == EAGAIN); + } while (($! == EAGAIN) or ($! == ECHILD)); } }; }