aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-02-02 18:35:55 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-02-02 18:35:55 +0000
commit80667e30fbd3feb95a0af4bca0f512694a438bde (patch)
treeac8223bf853a4aeae269030fd4692d717dd876a5 /shell
parenta2980c6249e476926f09a185840d893bb9a03a6e (diff)
downloadbusybox-w32-80667e30fbd3feb95a0af4bca0f512694a438bde.tar.gz
busybox-w32-80667e30fbd3feb95a0af4bca0f512694a438bde.tar.bz2
busybox-w32-80667e30fbd3feb95a0af4bca0f512694a438bde.zip
msh: fix Ctrl-C handling with line editing
Diffstat (limited to 'shell')
-rw-r--r--shell/msh.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 7371120ca..9a1be36d9 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -4836,7 +4836,9 @@ static int filechar(struct ioarg *ap)
4836 static int position = 0, size = 0; 4836 static int position = 0, size = 0;
4837 4837
4838 while (size == 0 || position >= size) { 4838 while (size == 0 || position >= size) {
4839 read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state); 4839 /* Repeat if Ctrl-C is pressed. TODO: exit on -1 (error/EOF)? */
4840 while (read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state) == 0)
4841 continue;
4840 size = strlen(filechar_cmdbuf); 4842 size = strlen(filechar_cmdbuf);
4841 position = 0; 4843 position = 0;
4842 } 4844 }