[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] ash: allow Ctrl-C to abort PS2, like Bash and Dash
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2020-11-16 12:10:26
Message-ID: CAK1hOcO7JFh4eL=9H2bRBWKThYJF5hoOTeJZFkNg6mXCmQwEJA () mail ! gmail ! com
[Download RAW message or body]

Applied, thank you

On Sat, May 9, 2020 at 12:04 PM Joachim Nilsson <troglobit@gmail.com> wrote:
>
> 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 <troglobit@gmail.com>
> ---
>  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
> busybox@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic