[Tarantool-patches] [PATCH 04/13] popen: add logging of fds closed in a child

Cyrill Gorcunov gorcunov at gmail.com
Fri Apr 10 10:46:42 MSK 2020


On Fri, Apr 10, 2020 at 05:50:42AM +0300, Alexander Turenko wrote:
> It is useful for debugging popen behaviour around file descriptors.
> 
> Part of #4031
Acked-by: Cyrill Gorcunov <gorcunov at gmail.com>

> ---
>  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);

Can we please shift args a bit, like

		say_debug("popen: close inherited fd [%s:%d]",
			  stdX_str(fd_no), fd_no);


More information about the Tarantool-patches mailing list