forked from coreos/cap-std-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmdext: Fix bug when srcfd == targetfd
See ostreedev/ostree-rs-ext#664 Basically in the case when the source fd number is the same as the target, `dup2` is a no-op. This is an astoundingly evil bug because it means we just don't pass the expected fd to the child process. Fix this by detecting this situation and just stripping off `O_CLOEXEC`. Signed-off-by: Colin Walters <[email protected]>
- Loading branch information
Showing
1 changed file
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters