diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-04-23 15:28:28 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-04-23 15:28:28 +0000 |
commit | 99f2bd557bab911edfe3f66458cf470c6848c9c7 (patch) | |
tree | 5b613c1439ae5bb391a398d5f5a0f011d4da9215 /cmdedit.c | |
parent | e39550946a9616fff1dcb0828d44f8c5be2754a0 (diff) | |
download | busybox-w32-99f2bd557bab911edfe3f66458cf470c6848c9c7.tar.gz busybox-w32-99f2bd557bab911edfe3f66458cf470c6848c9c7.tar.bz2 busybox-w32-99f2bd557bab911edfe3f66458cf470c6848c9c7.zip |
Some patches from Gennady Feldman. Fixed a glob problem such that
'ls *.h Config.h' works. Fixed a silly typo with fg/bg process control.
Made cmdedit exit sanely when it cannot read input.
git-svn-id: svn://busybox.net/trunk/busybox@2402 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'cmdedit.c')
-rw-r--r-- | cmdedit.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1211,7 +1211,8 @@ extern void cmdedit_read_input(char *prompt, char command[BUFSIZ]) | |||
1211 | fflush(stdout); /* buffered out to fast */ | 1211 | fflush(stdout); /* buffered out to fast */ |
1212 | 1212 | ||
1213 | if (read(inputFd, &c, 1) < 1) | 1213 | if (read(inputFd, &c, 1) < 1) |
1214 | return; | 1214 | /* if we can't read input then exit */ |
1215 | goto prepare_to_die; | ||
1215 | 1216 | ||
1216 | switch (c) { | 1217 | switch (c) { |
1217 | case '\n': | 1218 | case '\n': |
@@ -1243,6 +1244,7 @@ extern void cmdedit_read_input(char *prompt, char command[BUFSIZ]) | |||
1243 | /* Control-d -- Delete one character, or exit | 1244 | /* Control-d -- Delete one character, or exit |
1244 | * if the len=0 and no chars to delete */ | 1245 | * if the len=0 and no chars to delete */ |
1245 | if (len == 0) { | 1246 | if (len == 0) { |
1247 | prepare_to_die: | ||
1246 | printf("exit"); | 1248 | printf("exit"); |
1247 | clean_up_and_die(0); | 1249 | clean_up_and_die(0); |
1248 | } else { | 1250 | } else { |