On Tue, Sep 7, 2010 at 1:57 PM, Mark Salter <[email protected]> wrote:
> I am using busybox 1.17.1 and am seeing a hang in hush when a telnet
> session is closed without an explicit exit. In that case, hush gets a
> SIGHUP, but hush blocks SIGHUP so that it can be handled synchronously
> in check_and_run_traps(). The problem is that read_line_input never
> returns so check_and_run_traps never gets the chance to see the SIGHUP.

What are the symptoms? hush looping and eating 100% CPU?

> I had to use the following to get read_line_input to return on EOF. Am
> I missing anything here?
>
> diff --git a/libbb/lineedit.c b/libbb/lineedit.c
> index a9b790c..fe320bf 100644
> --- a/libbb/lineedit.c
> +++ b/libbb/lineedit.c
> @@ -2010,6 +2010,9 @@ int FAST_FUNC read_line_input(const char *prompt, char 
> *command, int maxsize, li
>  #endif
>
>                switch (ic) {
> +               case -1:
> +                       break_out = command_len = -1;
> +                       break;
>                case '\n':
>                case '\r':
>                vi_case('\n'|VI_CMDMODE_BIT:)


Thanks! Added the fix to hot fixes:

http://busybox.net/downloads/fixes-1.17.2/busybox-1.17.2-lineedit.patch

Does it fix the problem for you?
-- 
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to