On 10/11/26 10:33 AM, Denys Vlasenko via Bug reports for the GNU Bourne Again SHell wrote:

Now the same but with SIGTERM:

me@myhost>$ bash
me@myhost>$ export PS1='Prompt> '; trap 'echo T' term; (while kill $$; do
sleep 1; done) &
[1] 65964
Prompt>
exit
me@myhost>$ bash: line 1: kill: (65904) - No such process

without me pressing anything. Why did bash exit?! The trap does not contain
any 'exit' commands!

Readline treats SIGTERM as a fatal signal, like SIGHUP. This allows it to
exit the calling application if, for instance, the terminal emulator
window in which it's running is closed.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

  • trapped SIGT... Denys Vlasenko via Bug reports for the GNU Bourne Again SHell
    • Re: tra... Chet Ramey
      • Re:... Denys Vlasenko via Bug reports for the GNU Bourne Again SHell
        • ... Chet Ramey
          • ... Denys Vlasenko via Bug reports for the GNU Bourne Again SHell
    • Re: tra... Stan Marsh
      • Re:... Greg Wooledge
        • ... Chet Ramey
        • ... FĂ©lix Hauri via Bug reports for the GNU Bourne Again SHell
          • ... Chet Ramey

Reply via email to