[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem-solution

From: Chet Ramey
Subject: Re: problem-solution
Date: Tue, 2 Feb 2021 19:19:09 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

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

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

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    chet@case.edu    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]