Fixed edge case of interrupt handler for catching ended child processes.
This commit is contained in:
parent
867fa715eb
commit
6a72fddf7b
1 changed files with 4 additions and 0 deletions
|
@ -95,6 +95,10 @@ void Util::Procs::childsig_handler(int signum){
|
||||||
if (ret == 0){ //ignore, would block otherwise
|
if (ret == 0){ //ignore, would block otherwise
|
||||||
return;
|
return;
|
||||||
}else if (ret < 0){
|
}else if (ret < 0){
|
||||||
|
if (errno == EINTR){
|
||||||
|
childsig_handler(signum);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#if DEBUG >= 3
|
#if DEBUG >= 3
|
||||||
std::cerr << "SIGCHLD received, but no child died";
|
std::cerr << "SIGCHLD received, but no child died";
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue