[PATCH 1/1] Move signal handler assignment to be called after cmdedit_prompt init

Denys Vlasenko vda.linux at googlemail.com
Fri May 20 02:27:18 UTC 2011


On Monday 16 May 2011 16:01, Alexey Fomenko wrote:
> Signed-off-by: Alexey Fomenko <ext-alexey.fomenko at nokia.com>

> ---
>  libbb/lineedit.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libbb/lineedit.c b/libbb/lineedit.c
> index 0563e6d..48b4945 100644
> --- a/libbb/lineedit.c
> +++ b/libbb/lineedit.c
> @@ -2022,8 +2022,6 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
>  	new_settings.c_cc[VINTR] = _POSIX_VDISABLE;
>  	tcsetattr_stdin_TCSANOW(&new_settings);
>  
> -	previous_SIGWINCH_handler = signal(SIGWINCH, win_changed);
> -	win_changed(0); /* do initial resizing */
>  #if ENABLE_USERNAME_OR_HOMEDIR
>  	{
>  		struct passwd *entry;
> @@ -2044,6 +2042,8 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
>  
>  	/* Print out the command prompt, optionally ask where cursor is */
>  	parse_and_put_prompt(prompt);
> +	previous_SIGWINCH_handler = signal(SIGWINCH, win_changed);
> +	win_changed(0); /* do initial resizing */
>  	ask_terminal();
>  
>  	read_key_buffer[0] = 0;


Applied, thanks!
-- 
vda


More information about the busybox mailing list