If the Ctrl-C flag is not cleared before exiting the for/until/while loop, the next loop command will be unconditionally interrupted.
Closes: https://lore.kernel.org/u-boot/os7pr01mb138341d2719717e66b069f33fbc...@os7pr01mb13834.jpnprd01.prod.outlook.com/ Signed-off-by: Shiji Yang <[email protected]> --- common/cli_hush.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/cli_hush.c b/common/cli_hush.c index 7bd6943d3ed..ec07bf6b3be 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -1798,6 +1798,7 @@ static int run_list_real(struct pipe *pi) /* check Ctrl-C */ ctrlc(); if ((had_ctrlc())) { + clear_ctrlc(); return 1; } #endif -- 2.51.0

