[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash exiting session, command substitution, command_not_found_handle
From: |
Pierre Gaston |
Subject: |
bash exiting session, command substitution, command_not_found_handle |
Date: |
Sat, 28 Dec 2013 19:32:10 +0200 |
(from #bash on freenode)
Running a command that is not found in the background with a handler using
command substitution kills the shell, or the whole session.
Here is a test case:
$ ( bash -ci 'command_not_found_handle () { printf "$(true)"; };
nonexistingcommand &')
[1] 4696
$ bash: child setpgid (4697 to 4687): Operation not permitted
it will sometimes also exit the outer shell, closing the terminal.
The following reproducer always exit the outer shell (the handle in this
shell, and the options set don't matter):
$ (bash -ci 'command_not_founhandle () (:); nonexistingcommand &' )
I can reproduce this with 4.3rc1
- bash exiting session, command substitution, command_not_found_handle,
Pierre Gaston <=