mirror of
https://git.busybox.net/busybox.git
synced 2024-11-23 21:53:25 +08:00
hush: fix an interactive abort on error
function old new delta parse_and_run_stream 140 155 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
40fa8eb998
commit
3c8e540eb7
@ -7589,6 +7589,14 @@ static void parse_and_run_stream(struct in_str *inp, int end_trigger)
|
||||
}
|
||||
/* Force prompt */
|
||||
inp->p = NULL;
|
||||
/* Clear "peeked" EOF. Without this,
|
||||
* $ { cmd }<Enter>
|
||||
* > ^D
|
||||
* hush: syntax error: unterminated {
|
||||
* exits interactive shell:
|
||||
*/
|
||||
if (inp->peek_buf[0] == EOF)
|
||||
inp->peek_buf[0] = 0;
|
||||
/* This stream isn't empty */
|
||||
empty = 0;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user