Fix Util::TerminationNotifier deadlock when calling malloc() inside a signal handler.
This commit is contained in:
parent
5e640c09b9
commit
ca0fd8a641
1 changed files with 5 additions and 5 deletions
|
@ -56,12 +56,12 @@ void Util::Procs::childsig_handler(int signum){
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
TerminationNotifier tn = exitHandlers[ret];
|
if (exitHandlers.count(ret) > 0){
|
||||||
exitHandlers.erase(ret);
|
TerminationNotifier tn = exitHandlers[ret];
|
||||||
if (tn){
|
exitHandlers.erase(ret);
|
||||||
#if DEBUG >= 2
|
#if DEBUG >= 2
|
||||||
std::cerr << "Calling termination handler for " << pname << std::endl;
|
std::cerr << "Calling termination handler for " << pname << std::endl;
|
||||||
#endif
|
#endif
|
||||||
tn(ret, exitcode);
|
tn(ret, exitcode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue