--- sh.proc.c.orig 2006-09-27 09:59:04.000000000 -0700 +++ sh.proc.c 2008-09-04 10:36:33.000000000 -0700 @@ -514,8 +514,10 @@ pjwait(struct process *pp) cleanup_until(&oset); jobdebug_xprintf(("%d returned from sigsuspend loop\n", getpid())); #ifdef BSDJOBS - if (tpgrp > 0) /* get tty back */ + if (tpgrp > 0) { /* get tty back */ + signal(SIGTTOU, SIG_IGN); (void) tcsetpgrp(FSHTTY, tpgrp); + } #endif /* BSDJOBS */ if ((jobflags & (PSIGNALED | PSTOPPED | PTIME)) || !eq(dcwd->di_name, fp->p_cwd->di_name)) {