aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-08-19 18:22:13 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2004-08-19 18:22:13 +0000
commit50bff764c32353a67c2000c5d440c904959a9ec2 (patch)
tree4252286f7781b0b890634077bc59caac66b3ff4e /shell
parent2c65f6410b9eeb88b7de651aa1aabfb57ce2af9e (diff)
downloadbusybox-w32-50bff764c32353a67c2000c5d440c904959a9ec2.tar.gz
busybox-w32-50bff764c32353a67c2000c5d440c904959a9ec2.tar.bz2
busybox-w32-50bff764c32353a67c2000c5d440c904959a9ec2.zip
Patch from Vladimir N. Oleynik:
On Wed Aug 18, 2004 at 06:52:57PM +0800, Matt Johnston wrote: > I've come across some strange-seeming behaviour when running programs > under Busybox (1.0.0-rc3) ash. If the child process sets stdin to be > non-blocking and then exits, the parent ash will also exit. A quick strace > shows that a subsequent read() from stdin returns EAGAIN (as would be > expected): Thanks! Patch attached. --w vodz git-svn-id: svn://busybox.net/trunk/busybox@9127 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
-rw-r--r--shell/cmdedit.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 6d1dc603c..6c6c28693 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6062,7 +6062,7 @@ retry:
6062 } 6062 }
6063 goto retry; 6063 goto retry;
6064 } 6064 }
6065 if(nr < 0) { 6065 if(nr < 0 && errno == 0) {
6066 /* Ctrl+D presend */ 6066 /* Ctrl+D presend */
6067 nr = 0; 6067 nr = 0;
6068 } 6068 }
diff --git a/shell/cmdedit.c b/shell/cmdedit.c
index 25d31a0e0..56b789ab6 100644
--- a/shell/cmdedit.c
+++ b/shell/cmdedit.c
@@ -1297,6 +1297,7 @@ int cmdedit_read_input(char *prompt, char command[BUFSIZ])
1297 /* Control-d -- Delete one character, or exit 1297 /* Control-d -- Delete one character, or exit
1298 * if the len=0 and no chars to delete */ 1298 * if the len=0 and no chars to delete */
1299 if (len == 0) { 1299 if (len == 0) {
1300 errno = 0;
1300prepare_to_die: 1301prepare_to_die:
1301#if !defined(CONFIG_ASH) 1302#if !defined(CONFIG_ASH)
1302 printf("exit"); 1303 printf("exit");