diff options
Diffstat (limited to 'shell')
-rw-r--r-- | shell/msh.c | 4 |
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) static int position = 0, size = 0; while (size == 0 || position >= size) { - read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state); + /* Repeat if Ctrl-C is pressed. TODO: exit on -1 (error/EOF)? */ + while (read_line_input(current_prompt, filechar_cmdbuf, BUFSIZ, line_input_state) == 0) + continue; size = strlen(filechar_cmdbuf); position = 0; } |