[PATCH] Avoid inheriting *.stdout and *.stderr into every child process

Andrew Bartlett abartlet at samba.org
Mon Aug 27 10:43:42 UTC 2018


On Mon, 2018-08-27 at 12:29 +0200, Stefan Metzmacher wrote:
> Hi Andrew,
> 
> > > I hope this clarifies,
> > 
> > You can see that --tail still works on any job in the CI link:
> > https://gitlab.com/catalyst-samba/samba/pipelines/28743555
> > 
> > eg specifically:
> > https://gitlab.com/catalyst-samba/samba/-/jobs/92279525
> > 
> > A clarified patch attached.
> 
> I don't have access there, can you use the public samba-team pipelines?

Sorry, I've re-submitted the job there:

https://gitlab.com/samba-team/devel/samba/pipelines/28752233

> It's still unclear for the cases, where we don't explicitly
> pass in all three values for stdout, stderr and stdin.

The documentation states:

https://docs.python.org/2.6/library/subprocess.html

"If close_fds is true, all file descriptors except 0, 1 and
2 will be closed before the child process is executed. (Unix only)."

And regarding the passed in parameters:

"stdin, stdout and stderr specify the executed programs’ standard
input,
standard output and standard error file handles, respectively.  "
...

"With None, no redirection will occur;
the child’s file handles will be inherited from the parent. "

We can also see that from the fact that the tail operates in the output
above.

I trust this addresses your concerns.  These are otherwise just random
high FDs.

If you are still not convinced, we can with much less fuss ignore this
and just have the buildnice script changed to allow 1024 FDs.  I have
found these represented in the child Samba processes (via lsof and
/proc/$pid/fd), and up to 480 FDs consumed at the time of my
inspection. 

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba





More information about the samba-technical mailing list