Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > f021637f015d9008dd4db490554e61c6 > files > 17

ksh-20060214-1.7.src.rpm

--- ksh-20060214/src/cmd/ksh93/sh/jobs.c.ttou	2007-08-08 12:34:04.000000000 +0200
+++ ksh-20060214/src/cmd/ksh93/sh/jobs.c	2007-08-08 12:42:30.000000000 +0200
@@ -610,9 +610,16 @@
 {
 	/* 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,sh.pid) !=0)
+	{
+		signal(SIGTTOU, saved_handler);
 		return;
+	}
+	signal(SIGTTOU, saved_handler);
 #endif	/* SIGTSTP */
 	/* force the following tty_get() to do a tcgetattr() */
 	tty_set(-1, 0, NIL(struct termios*));