diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/sh/jobs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index b57b870..974e6dc 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: jobs.c,v 1.8 1996/10/16 02:30:39 steve Exp $ + * $Id: jobs.c,v 1.9 1996/12/14 06:19:18 steve Exp $ */ #ifndef lint @@ -600,8 +600,7 @@ forkshell(jp, n, mode) pgrp = getpid(); else pgrp = jp->ps[0].pid; - setpgid(0, pgrp); - if (mode == FORK_FG) { + if (setpgid(0, pgrp) == 0 && mode == FORK_FG) { /*** this causes superfluous TIOCSPGRPS ***/ #ifdef OLD_TTY_DRIVER if (ioctl(2, TIOCSPGRP, (char *)&pgrp) < 0) |