mcexec: wait for the signal to be received

The mcexec may send a signal to itself in order that the mcexec
terminates abnormally.
Generally, the signal is delivered to the thread which sent the signal.
In this case, the signal terminates the mcexec immediately.

However, if the signal is delivered to another thread,
the thread which sent the signal can call exit(3)
before the signal terminates the mcexec.
This commit is contained in:
NAKAMURA Gou
2014-01-21 15:56:23 +09:00
parent 069bb10a02
commit bdc945cb34

View File

@ -1004,6 +1004,7 @@ int main_loop(int fd, int cpu, pthread_mutex_t *lock)
if(sig){
signal(sig, SIG_DFL);
kill(getpid(), sig);
pause();
}
exit(term);