bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: errno not restore before printing error in exec_builtin


From: Emanuele Torre
Subject: Re: errno not restore before printing error in exec_builtin
Date: Mon, 28 Oct 2024 07:48:48 +0100
User-agent: Mutt/2.2.13 (2024-03-09)

On Mon, Oct 28, 2024 at 12:47:53AM +0100, Emanuele Torre wrote:
>      }
>    else
> -    file_error (command);
> +    {
> +      errno = opt;
> +      file_error (command);
> +    }
>  

I just thought that perhaps this branch was supposed to print errors for
the executable_file() function call above, so maybe the correct fix is
to change  else  =>  "else if (errno)"  instead of restoring it.

Anyway, that does not address that this if-elseif-else block always
prints duplicate errors. I have not found any case in which after
shell_execve() is called, this code print an error that is not a
duplicate.

o/
 emanuele6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]