Prior to patch:

    $ '
    > Ctrl-C
    >

I.e., not possible to breaḱ out from PS2 prompt, unless inputing final
quote character.   Ctrl-D works, but this patch makes ash behave like
Bash and Dash:

    $ '
    > Ctrl-C
    ash: syntax error: unterminated quoted string
    $

Signed-off-by: Joachim Nilsson <[email protected]>
---
 shell/ash.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/shell/ash.c b/shell/ash.c
index 2a4c839a7..f401a095f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -10629,8 +10629,8 @@ preadfd(void)
                                return 1;
                        }
                        exitstatus = 128 + SIGINT;
-                       bb_putchar('\n');
-                       goto retry;
+                       raise(SIGINT);
+                       return -1;
                }
                if (nr < 0) {
                        if (errno == 0) {
-- 
2.25.1

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to