um: Cleanup SIGTERM handling

Richard reported that some UML processes survive if the UML
main process receives a SIGTERM.
This issue was caused by a wrongly placed signal(SIGTERM, SIG_DFL)
in init_new_thread_signals().
It disabled the UML exit handler accidently for some processes.
The correct solution is to disable the fatal handler for all
UML helper threads/processes.
Such that last_ditch_exit() does not get called multiple times
and all processes can exit due to SIGTERM.

Reported-and-tested-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
Richard Weinberger
2013-08-18 13:30:08 +02:00
parent bc1d72e73b
commit 91d44ff860
8 changed files with 16 additions and 12 deletions

View File

@@ -1476,7 +1476,8 @@ int io_thread(void *arg)
struct io_thread_req *req;
int n;
ignore_sigwinch_sig();
os_fix_helper_signals();
while(1){
n = os_read_file(kernel_fd, &req,
sizeof(struct io_thread_req *));