NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "set -m" stalls shell when run in a new process group

On 8/15/11 11:57 PM, Christos Zoulas wrote:
In article<>,
Julio Merino<>  wrote:

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.

Aha, thanks for the details. I've filed a bug against Autotest (part of Autoconf).

Home | Main Index | Thread Index | Old Index