diff options
author | Richard Weinberger <richard@nod.at> | 2013-08-18 07:30:08 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2013-09-07 04:56:58 -0400 |
commit | 91d44ff860a9e9c0db81a89cbc24fa31fbd8e6d3 (patch) | |
tree | bb14601ab3afbcec3cb8d7d0f207d09cfc792268 /arch/um/drivers/ubd_kern.c | |
parent | bc1d72e73be63a7c4a07eb10cf51e91f20bf6076 (diff) |
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>
Diffstat (limited to 'arch/um/drivers/ubd_kern.c')
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 1812bc81715b..3716e6952554 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -1476,7 +1476,8 @@ int io_thread(void *arg) | |||
1476 | struct io_thread_req *req; | 1476 | struct io_thread_req *req; |
1477 | int n; | 1477 | int n; |
1478 | 1478 | ||
1479 | ignore_sigwinch_sig(); | 1479 | os_fix_helper_signals(); |
1480 | |||
1480 | while(1){ | 1481 | while(1){ |
1481 | n = os_read_file(kernel_fd, &req, | 1482 | n = os_read_file(kernel_fd, &req, |
1482 | sizeof(struct io_thread_req *)); | 1483 | sizeof(struct io_thread_req *)); |