[Top][All Lists]

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

Re: Does Bash 5.1 block SIGINT until here-document is ready?

From: Chet Ramey
Subject: Re: Does Bash 5.1 block SIGINT until here-document is ready?
Date: Sat, 12 Dec 2020 14:16:15 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.5.1

On 12/12/20 5:54 AM, Oğuz wrote:
In Bash 5.1, Ctrl-C doesn't interrupt the command below. The only way out I
guess is to stop it Ctrl-Z and run `kill %%`, but that's really too much

     cat <<!
     `sleep 10`

This isn't reproducible with Bash 5.0 or Bash 4.4.

It's not a signal blocking problem. It's a combination of an interactive
shell and the shell forked to run the command substitution inside the shell
forked to run `cat', which is running the redirection. The issue is that
the child running the command subsitition is not placed into the correct
process group, so its process group is not the same as the terminal's. It
should join its parent's process group.

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