jobs: Allow monitor mode without a tty in non-interactive mode

When a tty is unavailable, or the shell is in the background,
job control could still be used for the purpose of setting
process groups.

This is based on work by Jilles Tjoelker from FreeBSD and Steffen

Reported-by: Steffen Nurpmeso <>
Reported-by: Ganael Laplanche <>
Signed-off-by: Herbert Xu <>
1 file changed