On 2/2/21 1:49 PM, Lawrence Velázquez wrote:
Of course, removing this restriction opens up the possibility that a user
can shoot themselves by trying to use job control at the same time.
Remember that `job control' isn't just suspending and restarting jobs. It's
mostly about multiplexing jobs (identified by process groups) onto the
terminal, which has a single foreground process group at a time. Your
change leaves a pipeline with processes running in two separate process
groups, and one of them isn't going to have access to the terminal. That
means that any keyboard-generated signal, say SIGINT, won't get to all of
the processes in the pipeline. Let's not even get into the signals that
get sent when a process that isn't in the terminal's process group tries to
read or write from the terminal.
To make this work correctly requires a lot more work, and you might as well
solve the SIGTSTP problem while you're at it.
I think
that is a pretty rare case where one would want to do that, like, close to
never.
I think it's more common than you might think, and I think it's very common
to want to interrupt a pipeline.
Here is Chet's response to a similar request nearly four years ago
(https://lists.gnu.org/archive/html/bug-bash/2017-03/msg00197.html):
Thanks, this saved me from looking it up.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/