bug-bash
[Top][All Lists]
Advanced

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

Re: bug in bash


From: Chet Ramey
Subject: Re: bug in bash
Date: Tue, 14 May 2024 14:52:08 -0400
User-agent: Mozilla Thunderbird

On 5/14/24 11:12 AM, Chet Ramey wrote:
On 5/14/24 10:20 AM, Andreas Schwab wrote:
On Mai 14 2024, Chet Ramey wrote:

Setting the process group might solve this particular issue, at the cost of
losing keyboard-generated signals. That's not so bad for SIGINT, though
people do expect to be able to kill a procsub when you interrupt the job
using it, but you also wouldn't be able to suspend the procsub with ^Z any
more. When you're  running a job that contains a process substitution, the
historical behavior has been that you're able to suspend it along with the
rest of the job. Same with hitting the job pgrp with something like SIGHUP.

But leaving it in the process group of the parent shell does not
accomplish that, which is actually the point of this thread.

It does in two cases: a builtin command, where the process group doesn't
change, and a pipeline, where the process group is already set and the
process substitution doesn't change it.

I should probably have included what I suspect is the most common case:
process substitution that's part of a redirection associated with a simple
command that's not a builtin or function. Since redirections are performed
in the child process, the process substitution inherits the (already-set)
process group of the simple command.

--
``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]