Page MenuHomeFreeBSD

diff: Correct fd 0 case on pipe
Needs ReviewPublic

Authored by jilles on Sat, May 9, 9:24 PM.
Tags
None
Referenced Files
F157410064: D56910.diff
Thu, May 21, 2:38 AM
F157393695: D56910.diff
Wed, May 20, 10:57 PM
F157366582: D56910.id.diff
Wed, May 20, 4:19 PM
Unknown Object (File)
Wed, May 20, 12:04 AM
Unknown Object (File)
Mon, May 18, 11:33 AM
Unknown Object (File)
Sun, May 17, 1:14 AM
Unknown Object (File)
Fri, May 15, 5:02 AM
Unknown Object (File)
Thu, May 14, 9:56 AM
Subscribers

Details

Reviewers
bapt
Summary

After git commit c8d40bf8ecc60cc15e3904410db62065ea681fdc, if fd 0 was
not open, it is left with CLOEXEC set and therefore fails. This is an
unlikely situation, but fixing it reduces the size of the code (by using
posix_spawn_file_actions_adddup2's special case if the two file
descriptor numbers are the same).

At the same time, check the error code from
posix_spawn_file_actions_adddup2.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72953
Build 69836: arc lint + arc unit