Re: errno not restore before printing error in exec_builtin

2024-10-28 Thread Chet Ramey
On 10/27/24 7:47 PM, Emanuele Torre wrote: In a branch of exec_builtin(), errno is not restored before printing an error message, and that causes "Success" to be printed. Thanks for the report. The right fix for this is to suppress the exec builtin printing an error message in the cases where s

Re: errno not restore before printing error in exec_builtin

2024-10-27 Thread Emanuele Torre
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 ab