Skip to content
Snippets Groups Projects
Commit 16c83356 authored by Alexander Turenko's avatar Alexander Turenko Committed by Kirill Yukhin
Browse files

popen: add logging of fds closed in a child


It is useful for debugging popen behaviour around file descriptors.

Part of #4031

Acked-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
parent 96a25ee0
No related branches found
No related tags found
No related merge requests found
......@@ -579,6 +579,8 @@ close_inherited_fds(int *skip_fds, size_t nr_skip_fds)
if (fd_no == -1)
continue;
say_debug("popen: close inherited fd [%s:%d]",
stdX_str(fd_no), fd_no);
if (close(fd_no)) {
int saved_errno = errno;
diag_set(SystemError, "fdin: Can't close %d", fd_no);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment