-Prevent successive nextdestiny requests from spawning busy loop (loss of TCP socket caused parent to exit, child removes FD, but select won't return zero just because of that)
-Prevent closed client socket from inducing infinite select due to previous change. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1489 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
87d3f80207
commit
3d50a37502
@ -739,7 +739,7 @@ sub plugin_command {
|
||||
if ($sock) {
|
||||
my $clientpresence = new IO::Select; #The client may have gone away without confirmation, don't PIPE over this trivial thing
|
||||
$clientpresence->add($sock);
|
||||
if ($clientpresence->can_write) {
|
||||
if ($clientpresence->can_write(5)) {
|
||||
print $sock XMLout(\%done,RootName => 'xcatresponse',NoAttr=>1);
|
||||
}
|
||||
}
|
||||
@ -783,6 +783,7 @@ sub dispatch_callback {
|
||||
last;
|
||||
} else {
|
||||
$parselect->remove($dispatch_parentfd); #Block until parent acks data
|
||||
last;
|
||||
}
|
||||
$selbits = $parselect->bits;
|
||||
yield;
|
||||
@ -1010,6 +1011,7 @@ sub convey_response {
|
||||
last;
|
||||
} else {
|
||||
$parsel->remove($parent_fd);
|
||||
last;
|
||||
}
|
||||
}
|
||||
yield; #If still around, it means a peer process still hasn't gotten to us, so might as well yield
|
||||
@ -1107,7 +1109,7 @@ sub service_connection {
|
||||
syslog("local4|err","xcatd: possible BUG encountered by xCAT TCP service: ".$@);
|
||||
}
|
||||
}
|
||||
$SIG{ALRM}= sub { die "Failure shutting down" };
|
||||
$SIG{ALRM}= sub { die "$$ failed shutting down" };
|
||||
alarm(10);
|
||||
foreach (keys %tables) {
|
||||
$tables{$_}->commit;
|
||||
|
Loading…
Reference in New Issue
Block a user