[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] coreutils/timeout: send signals to all processes in a group
From:       "Laurent Bercot" <ska-dietlibc () skarnet ! org>
Date:       2020-12-12 8:40:30
Message-ID: em4e18d512-edf0-4eeb-a441-eb9fa080cc62 () elzian
[Download RAW message or body]

>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

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic