From bdc945cb34fc61f2dc61d8688480968883948854 Mon Sep 17 00:00:00 2001 From: NAKAMURA Gou Date: Tue, 21 Jan 2014 15:56:23 +0900 Subject: [PATCH] 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. --- executer/user/mcexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/executer/user/mcexec.c b/executer/user/mcexec.c index 9f9e403b..941929be 100644 --- a/executer/user/mcexec.c +++ b/executer/user/mcexec.c @@ -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);