Fixed a bug. (DTSC lib mistakenly wiped metadata when seeking backwards, re-re-fixed proc child signal problems)
This commit is contained in:
parent
6a72fddf7b
commit
9cdf8d92a1
2 changed files with 6 additions and 14 deletions
|
@ -91,17 +91,9 @@ void Util::Procs::childsig_handler(int signum){
|
|||
return;
|
||||
}
|
||||
int status;
|
||||
pid_t ret = waitpid( -1, &status, WNOHANG);
|
||||
if (ret == 0){ //ignore, would block otherwise
|
||||
return;
|
||||
}else if (ret < 0){
|
||||
if (errno == EINTR){
|
||||
childsig_handler(signum);
|
||||
return;
|
||||
}
|
||||
#if DEBUG >= 3
|
||||
std::cerr << "SIGCHLD received, but no child died";
|
||||
#endif
|
||||
pid_t ret = waitpid( -1, &status, 0);
|
||||
if (ret <= 0){
|
||||
childsig_handler(signum);
|
||||
return;
|
||||
}
|
||||
int exitcode;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue