diff options
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/hush.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/hush.c b/shell/hush.c index f8951d084..ac8e44778 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -7589,6 +7589,14 @@ static void parse_and_run_stream(struct in_str *inp, int end_trigger) | |||
| 7589 | } | 7589 | } |
| 7590 | /* Force prompt */ | 7590 | /* Force prompt */ |
| 7591 | inp->p = NULL; | 7591 | inp->p = NULL; |
| 7592 | /* Clear "peeked" EOF. Without this, | ||
| 7593 | * $ { cmd }<Enter> | ||
| 7594 | * > ^D | ||
| 7595 | * hush: syntax error: unterminated { | ||
| 7596 | * exits interactive shell: | ||
| 7597 | */ | ||
| 7598 | if (inp->peek_buf[0] == EOF) | ||
| 7599 | inp->peek_buf[0] = 0; | ||
| 7592 | /* This stream isn't empty */ | 7600 | /* This stream isn't empty */ |
| 7593 | empty = 0; | 7601 | empty = 0; |
| 7594 | continue; | 7602 | continue; |
