mainThe GNU Bourne-Again SHell - Support: sr #108593, Interrupt on process substitution...


sr #108593: Interrupt on process substitution from stdin kills bash

Submitter:  DrkShadow <drkshadow>
Submitted:  Wed 04 Jun 2014 06:38:01 AM UTC
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Done
Privacy:  Public Assigned to:  None
Open/Closed:  Open Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup

Jump to the original submission

Tue 20 Oct 2020 11:32:42 AM UTC, comment #6: 

A similar problem occurs with command substitution:

Robert Hensing <roberth>
Tue 17 Nov 2015 09:37:55 PM UTC, comment #5: 

I have figured out why, and will have a fix in place for the next version.

Chet Ramey <chet>
Group administrator
Mon 16 Nov 2015 09:51:24 PM UTC, comment #4: 

For an unknown reason, xterm (but not other terminal emulators) sends the parent shell a SIGHUP after the SIGINT, which causes the shell to exit.  I'm looking at why that is.

Chet Ramey <chet>
Group administrator
Sat 14 Nov 2015 12:30:25 AM UTC, comment #3: 

Talking with another,

this issue doesn't happen in bash inside a bash. I also can't reproduce it in a tty. For me it happens inside screen inside xterm. Another says it happens in xterm and st, but not urxvt. The same person says also that zsh and ksh do not have the issue.

$ xterm bash

$ cat < <(cat)

causes multiple terminals to exit.

DrkShadow <drkshadow>
Wed 25 Mar 2015 11:18:21 AM UTC, comment #2: 

Not a bug

Cannot reproduce:

dualbus@yaqui ~/t % bash                          
dualbus@yaqui:~/t$ cat < <(cat)
GNU bash, version 4.3.33(1)-release (x86_64-pc-linux-gnu)
dualbus@yaqui:~/t$ exit
dualbus@yaqui ~/t % ~/local/gnu/bash/devel/bin/bash
dualbus@yaqui:~/t$ cat < <(cat)
GNU bash, version 4.4.0(1)-devel (x86_64-unknown-linux-gnu)

Eduardo Bustamante <dualbus>
Wed 04 Jun 2014 06:46:30 AM UTC, comment #1: 

Final line did not display:

cat < <(cat)

When you execute and then ctrl-C this command, BASH exits.

DrkShadow <drkshadow>
Wed 04 Jun 2014 06:38:01 AM UTC, original submission:  

I was executing a command, and made a typo on sed -- left off the filename. I couldn't ctrl-c the command, so I suspended and used kill:

$ sqlite3  spambayes.sqlite  < <(echo 'SELECT id FROM table WHERE id IN ('; sed 's/[^|]\+|//; s/|.*/,/'; echo '-1);')
[1]+  Stopped                 sqlite3 spambayes.sqlite < <(echo 'SELECT id FROM table WHERE id IN ('; sed 's/[^|]\+|//; s/|.*/,/'; echo '-1);')
$ kill %1

This caused bash to exit. I was in screen at the time, and the index in the list of screens disappeared, processes that were backgrounded in that bash session were killed. This seems erroneous. Another distilled this significantly, and this command exibits the same behavior on ctrl-c:
+verbatim+$ cat < <(cat)-verbatim-

When you hit ctrl-c, bash will exit. I don't say crash as I don't see a core dump file, and there is no note in dmesg about a segfault.

DrkShadow <drkshadow>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by roberth (Posted a comment)
  • -email is unavailable- added by chet (Updated the item)
  • -email is unavailable- added by dualbus (Posted a comment)
  • -email is unavailable- added by drkshadow (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-17 chet StatusWorks For Me Done
    2015-11-13 chet StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code