On Sat, Dec 28, 2013 at 7:32 PM, Pierre Gaston <pierre.gas...@gmail.com>wrote:

> (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
>
>
Sorry, this last example was bogus, I meant:
( bash -ci 'command_not_found_handle { $(:);  }; nonexistingcommand &')

however:
(bash -ci 'command_not_found_handle (:); nonexistingcommand &)
seems to close my ubuntu session...but I cannot reproduce this everywhere

bash neatly exits, saving history and everything

Reply via email to