In article<4E498C8F.506%julipedia.org@localhost>,
Julio Merino<jmmv%julipedia.org@localhost> wrote:
Hello,
I am not sure what the right behavior is here, but I am seeing this with
/bin/sh and /bin/ksh but not bash.
I have a program (atf) that spawns a child process and sets the child
process to run in its own process group. This child process spawns a
shell and the shell script that it runs does "set -m".
At this point, the shell blocks. In the case of /bin/sh, the block
happens at the "killpg(0, SIGTTIN);" line.
It means that the shell lacks access to the tty in order to be able to
do job control, so it stops itself. Typical the shell figures out if
it can do job control automatically, and if it can't it does not, but
you are forcing it to with -m.