jobs: Allow monitor mode without a tty in non-interactive mode
commit74085cc28deb9d95867ad7c350efd11ea722a552
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 7 Apr 2024 09:04:37 +0000 (7 17:04 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 12 Apr 2024 08:06:02 +0000 (12 16:06 +0800)
tree5023f1f826e42a9064b894e87266aba4e5dcf731
parentd489f2e2e98268894a38a1c84da559e74020c47b
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
Nurpmeso.

Reported-by: Steffen Nurpmeso <steffen@sdaoden.eu>
Reported-by: Ganael Laplanche <ganael.laplanche@martymac.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
src/jobs.c