summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog1
-rw-r--r--src/jobs.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d87e5d4..dcb7182 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
 	* Fix dowait signal race.
 	* Remove EXSIG.
+	* Do not close stderr when /dev/tty fails to open.
 
 2009-01-14  Herbert Xu <herbert@gondor.apana.org.au>
 
diff --git a/src/jobs.c b/src/jobs.c
index 69a84f7..b1ab7ab 100644
--- a/src/jobs.c
+++ b/src/jobs.c
@@ -195,6 +195,9 @@ setjobctl(int on)
 			while (!isatty(fd))
 				if (--fd < 0)
 					goto out;
+			fd = dup(fd);
+			if (fd < 0)
+				goto out;
 		}
 		fd = savefd(fd);
 		do { /* while we are in the background */