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:
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user