diff options
| author | Eric W. Biederman <[email protected]> | 2022-06-21 19:38:52 +0000 |
|---|---|---|
| committer | Eric W. Biederman <[email protected]> | 2022-07-20 15:23:51 +0000 |
| commit | d80f7d7b2c75c5954d335dffbccca62a5002c3e0 (patch) | |
| tree | 323d202b5875f926c9b35f660ed3c1aa6334183d /net/unix/af_unix.c | |
| parent | signal: Ensure SIGNAL_GROUP_EXIT gets set in do_group_exit (diff) | |
| download | kernel-d80f7d7b2c75c5954d335dffbccca62a5002c3e0.tar.gz kernel-d80f7d7b2c75c5954d335dffbccca62a5002c3e0.zip | |
signal: Guarantee that SIGNAL_GROUP_EXIT is set on process exit
Track how many threads have not started exiting and when the last
thread starts exiting set SIGNAL_GROUP_EXIT.
This guarantees that SIGNAL_GROUP_EXIT will get set when a process
exits. In practice this achieves nothing as glibc's implementation of
_exit calls sys_group_exit then sys_exit. While glibc's implemenation
of pthread_exit calls exit (which cleansup and calls _exit) if it is
the last thread and sys_exit if it is the last thread.
This means the only way the kernel might observe a process that does
not set call exit_group is if the language runtime does not use glibc.
With more cleanups I hope to move the decrement of quick_threads
earlier.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: "Eric W. Biederman" <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
