aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-04-28 22:39:02 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-04-28 22:39:02 +0000
commit617bd16ad6d8ec456fb1848121a3c4d6b95f7588 (patch)
treec386a79f3a9347cbba9b224357801e69ab1b9e4d
parenta7a0f08adc692821bb869bb407707466a976c5d2 (diff)
downloadbusybox-w32-617bd16ad6d8ec456fb1848121a3c4d6b95f7588.tar.gz
busybox-w32-617bd16ad6d8ec456fb1848121a3c4d6b95f7588.tar.bz2
busybox-w32-617bd16ad6d8ec456fb1848121a3c4d6b95f7588.zip
ash: fix infinite loop on exit if tty is not there anymore
git-svn-id: svn://busybox.net/trunk/busybox@18530 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--shell/README5
-rw-r--r--shell/ash.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/shell/README b/shell/README
index 2b1d05ceb..40447cacb 100644
--- a/shell/README
+++ b/shell/README
@@ -1,5 +1,10 @@
1Various bits of what is known about busybox shells, in no particular order. 1Various bits of what is known about busybox shells, in no particular order.
2 2
32007-04-28
4hush: Ctrl-C and Ctrl-Z for single NOFORK commands are working.
5Memory and other resource leaks (opendir) are not addressed
6(testcase is "rm -i" interrupted by ctrl-c).
7
32007-04-21 82007-04-21
4hush: "sleep 5 | sleep 6" + Ctrl-Z + fg seems to work. 9hush: "sleep 5 | sleep 6" + Ctrl-Z + fg seems to work.
5"rm -i" + Ctrl-C, "sleep 5" + Ctrl-Z still doesn't work 10"rm -i" + Ctrl-C, "sleep 5" + Ctrl-Z still doesn't work
diff --git a/shell/ash.c b/shell/ash.c
index 90936fcc0..16818cfc9 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3501,7 +3501,9 @@ setjobctl(int on)
3501 /* turning job control off */ 3501 /* turning job control off */
3502 fd = ttyfd; 3502 fd = ttyfd;
3503 pgrp = initialpgrp; 3503 pgrp = initialpgrp;
3504 xtcsetpgrp(fd, pgrp); 3504 /* was xtcsetpgrp, but this can make exiting ash
3505 * with pty already deleted loop forever */
3506 tcsetpgrp(fd, pgrp);
3505 setpgid(0, pgrp); 3507 setpgid(0, pgrp);
3506 setsignal(SIGTSTP); 3508 setsignal(SIGTSTP);
3507 setsignal(SIGTTOU); 3509 setsignal(SIGTTOU);