Fix Util::TerminationNotifier deadlock when calling malloc() inside a signal handler.

This commit is contained in:
Thulinma 2012-08-24 15:09:35 +02:00
parent 5e640c09b9
commit ca0fd8a641

View file

@ -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);
}
}