From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 91FF54696C6 for ; Fri, 10 Apr 2020 05:51:10 +0300 (MSK) From: Alexander Turenko Date: Fri, 10 Apr 2020 05:50:42 +0300 Message-Id: In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 04/13] popen: add logging of fds closed in a child List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cyrill Gorcunov Cc: tarantool-patches@dev.tarantool.org 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