msh: fix Ctrl-C handling with line editing

This commit is contained in:
Denis Vlasenko
2008-02-02 18:35:55 +00:00
parent a2980c6249
commit 80667e30fb
3 changed files with 7 additions and 6 deletions

View File

@ -1315,8 +1315,8 @@ static void win_changed(int nsig)
#define CTRL(a) ((a) & ~0x40)
/* Returns:
* -1 on read errors or EOF, or on bare Ctrl-D.
* 0 on ctrl-C,
* -1 on read errors or EOF, or on bare Ctrl-D,
* 0 on ctrl-C (the line entered is still returned in 'command'),
* >0 length of input string, including terminating '\n'
*/
int read_line_input(const char *prompt, char *command, int maxsize, line_input_t *st)