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
This commit is contained in:
parent
bcabd11857
commit
c67d9135c1
@ -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));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user