Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
posix: Fix pipe fd leak if redirecting both stdout and stderr
This re-adds the close(source) call which already existed here before commit caa7b2f. pipe_out already closes the source fd when redirecting stdout or stderr, it was just missing when redirecting both at once. The pipe fds must be closed after redirecting to avoid keeping the pipe open unnecessarily, for example the parent may want to close their end of the pipe. Closes: #353 Signed-off-by: Daniel Klauer <[email protected]>
- Loading branch information