[PATCH] Avoid inheriting *.stdout and *.stderr into every child process
Gary Lockyer
gary at catalyst.net.nz
Tue Aug 28 02:54:54 UTC 2018
RB+
On 27/08/18 22:43, Andrew Bartlett via samba-technical wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180828/77b8f209/signature.sig>
More information about the samba-technical
mailing list