[PATCH 0/4] um: Set parent-death signal for sub-processes
Posted by
Tiwei Bie
1 month ago
The ubd io and write_sigio threads/processes may leak e.g. when
the main process is killed by "kill -9". Fix it by setting the
parent-death signal for them.
Tiwei Bie (4):
um: Add os_set_pdeathsig helper function
um: Set parent-death signal for ubd io thread/process
um: Set parent-death signal for write_sigio thread/process
um: Use os_set_pdeathsig helper in winch thread/process
arch/um/drivers/chan_user.c | 3 +--
arch/um/drivers/ubd_kern.c | 1 +
arch/um/include/shared/os.h | 2 ++
arch/um/os-Linux/process.c | 6 ++++++
arch/um/os-Linux/sigio.c | 1 +
5 files changed, 11 insertions(+), 2 deletions(-)
--
2.34.1
Re: [PATCH 0/4] um: Set parent-death signal for sub-processes
Posted by
Johannes Berg
1 month ago
On Thu, 2024-10-24 at 22:28 +0800, Tiwei Bie wrote:
> The ubd io and write_sigio threads/processes may leak e.g. when
> the main process is killed by "kill -9". Fix it by setting the
> parent-death signal for them.
>
I always used killall, but yeah, good idea, thanks!
johannes