[PATCH] coreutils/timeout: send signals to all processes in a group

Laurent Bercot ska-dietlibc at skarnet.org
Sat Dec 12 08:40:30 UTC 2020


>In current implementation of busybox timeout utility, when a signal
>is sent to the process that needs to timeout, it does not affect the
>children. To fix this we set the process group id of the process that
>the signal is sent, same as it's pid, making it the process group
>leader. When sending signal, we sent it to negative pid number as per
>man page and signal is received by all children.

  That is a very disruptive change that modifies the semantics of
'timeout' entirely, and that leads to unintuitive behaviour for
instance wrt ^C when used in a terminal.
  Well-behaved programs should never need signals sent to the process
group, and when a utility does that it should be *very obvious*.

  At the very least, if the functionality is implemented, it needs to
be configurable via a command-line option.

--
  Laurent



More information about the busybox mailing list