tty-login fails if another bash is exec'ed in .bashrc: no job control in
From:
Tycho Kirchner
Subject:
tty-login fails if another bash is exec'ed in .bashrc: no job control in background
Date:
Sun, 16 Feb 2020 21:15:14 +0100
Dear bash-maintainers,
Description:
When another instance of bash is called *within the .bashrc* using the
exec-builtin within a tty (e.g. Ctrl+Alt+F1) the following error
occurs:
initialize_job_control: no job control in background: Bad file
descriptor
On the next keypress the user is logged off. This used to work fine
in bash 4.4.
Repeat-By:
Put the following snippet into your .bashrc, but make sure you can
change that later on,
because the login fails!
if [[ -z $foo_exec_test ]]; then
export foo_exec_test=123
echo "exec bash"
exec bash
fi
Thanks
Best Regards
Tycho
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc