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
|
||||
|
||||
TerminationNotifier tn = exitHandlers[ret];
|
||||
exitHandlers.erase(ret);
|
||||
if (tn){
|
||||
#if DEBUG >= 2
|
||||
if (exitHandlers.count(ret) > 0){
|
||||
TerminationNotifier tn = exitHandlers[ret];
|
||||
exitHandlers.erase(ret);
|
||||
#if DEBUG >= 2
|
||||
std::cerr << "Calling termination handler for " << pname << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
tn(ret, exitcode);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue