Re: [PATCH] unix exec: avoid atexit handlers when child execvp fails

2021-05-04 Thread Daniel Kiper
On Thu, Apr 29, 2021 at 12:34:34PM +0100, Dimitri John Ledkov wrote: > Functions `grub_util_exec_pipe()` and `grub_util_exec_pipe_stderr()` > currently call `execvp()`. If the call fails for any reason, the child > currently calls `exit(127)`. This in turn executes the parents > `atexit()` handlers

[PATCH] unix exec: avoid atexit handlers when child execvp fails

2021-04-29 Thread Dimitri John Ledkov
Functions `grub_util_exec_pipe()` and `grub_util_exec_pipe_stderr()` currently call `execvp()`. If the call fails for any reason, the child currently calls `exit(127)`. This in turn executes the parents `atexit()` handlers from the forked child, and then the same handlers are called again from pare