grub-devel
[Top][All Lists]
Advanced

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

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


From: Daniel Kiper
Subject: Re: [PATCH] unix exec: avoid atexit handlers when child execvp fails
Date: Tue, 4 May 2021 17:30:08 +0200
User-agent: NeoMutt/20170113 (1.7.2)

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 from the forked child, and then the same handlers
> are called again from parent. This is usually not desired, and can
> lead to deadlocks, and undesired behaviour.
>
> This patch fixes up "unix exec: avoid atexit handlers when child
> exits" further.
>
> Fixes e75cf4a58b5eaf482804e5e1b2cc7d4399df350e
>
> Signed-off-by: Dimitri John Ledkov <xnox@ubuntu.com>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel



reply via email to

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