[Tarantool-patches] [PATCH 04/13] popen: add logging of fds closed in a child
Alexander Turenko
alexander.turenko at tarantool.org
Fri Apr 10 05:50:42 MSK 2020
It is useful for debugging popen behaviour around file descriptors.
Part of #4031
---
src/lib/core/popen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/lib/core/popen.c b/src/lib/core/popen.c
index 3fcbc325a..9d4e6ef3a 100644
--- a/src/lib/core/popen.c
+++ b/src/lib/core/popen.c
@@ -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);
--
2.25.0
More information about the Tarantool-patches
mailing list