diff options
author | Ron Yorston <rmy@pobox.com> | 2024-05-14 12:33:03 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-05-14 12:33:03 +0100 |
commit | 569de936abb90f4c7cdca9da111a6ea780b135bf (patch) | |
tree | f1965765683e09ca780b39340abac90f349e47a4 /init | |
parent | bb128070e590234f8b63fb1d67f7621a1b4b3ff3 (diff) | |
download | busybox-w32-569de936abb90f4c7cdca9da111a6ea780b135bf.tar.gz busybox-w32-569de936abb90f4c7cdca9da111a6ea780b135bf.tar.bz2 busybox-w32-569de936abb90f4c7cdca9da111a6ea780b135bf.zip |
kill: killing a zombie process should fail
A process which has exited may still have its process handle
held open by its children. Such a process doesn't appear in
the process table. It is thus similar to a zombie process in
UNIX. Using kill(1) to interact with such a process was seen
to succeed, contrary to expectation.
The code for "ordinary" signals in kill(2) did check if the
process was still active but didn't treat an attempt to kill
an inactive process as an error. Furthermore, sending SIGKILL
or the fake signal 0 to a process didn't even check if the
process was still active.
Rearrange the implementation of kill(2) so that an attempt to
signal an inactive process is treated as an error. This also
consolidates handling of SIGKILL and signal 0 with "ordinary"
signals.
Saves 96 bytes.
(GitHub issue #416)
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions