diff -up ksh-20080725/src/cmd/ksh93/sh/jobs.c.ttou ksh-20080725/src/cmd/ksh93/sh/jobs.c --- ksh-20080725/src/cmd/ksh93/sh/jobs.c.ttou 2008-07-28 08:25:02.000000000 +0200 +++ ksh-20080725/src/cmd/ksh93/sh/jobs.c 2008-07-28 08:27:30.000000000 +0200 @@ -663,9 +663,16 @@ static void job_reset(register struct pr { /* save the terminal state for current job */ #ifdef SIGTSTP + Sig_handler_t saved_handler; + + saved_handler = signal(SIGTTOU, SIG_IGN); job_fgrp(pw,tcgetpgrp(job.fd)); if(tcsetpgrp(job.fd,job.mypid) !=0) + { + signal(SIGTTOU, saved_handler); return; + } + signal(SIGTTOU, saved_handler); #endif /* SIGTSTP */ /* force the following tty_get() to do a tcgetattr() unless fg */ if(!(pw->p_flag&P_FG))