Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always mark pipe in pipe-open as inherit-on-exec
Since 2cdf406 a lot of file descriptors are opened close-on-exec, including the pipe that is passed to the child process in a pipe-open. This is usually fine because a dup2 follows to rename that handle to stdin/stdout that will set the inherit-on-exec. However, if the pipe descriptor already has the right value, for example because stdin was closed, then no dup2 happens and hence it's still marked as close-on-exec right when we want to perform an exec. This patch explicitly marks such a handle as inherit-on-exec, to ensure it will be open for the child process.
- Loading branch information