popen: fix close-on-exec flag setting
fcntl(2) lists flags that can be set using F_SETFL: O_CLOEXEC is not included there. F_SETFD should be used to set close-on-exec. Parent's end of pipes are closed explicitly in a child process anyway. However this change fixes closing of the copy of a logger fd. See commit 07a07b3c ('popen: decouple logger fd from stderr') for more information why this file descriptor was introduced. Part of #4031. Acked-by:Cyrill Gorcunov <gorcunov@gmail.com>
Loading
Please register or sign in to comment