[Bug 3547] shell read is maybe too safe

Ian Wienand ianw at vmware.com
Mon Apr 11 20:55:27 UTC 2011


On 04/11/2011 10:01 AM, Denys Vlasenko wrote:
> This works. Try this:
>
> $ ./busybox hush
> ~/srcdevel/bbox/fix/busybox.t5 # read qwe
> ^C^C^C^C^C

Hmm, yes.  I think this fix is still actually required for hush, but
it seems that in interactive mode hush has set SIGINT to ignored,
which blocks the signal so the read never returns.

I guess something like what is done in hush's builtin_wait() needs to
be done in builtin_read() as well, to let the signals through before
the read call.

git annotate suggests you wrote these functions, so I guess you know
best what the intention is here :) If you would rather me dig further
I can.

-i


More information about the busybox mailing list