[PATCH] fix issues with the standard model control pipe.

Andrew Bartlett abartlet at samba.org
Mon Sep 25 19:08:31 UTC 2017


On Sun, 2017-09-17 at 16:23 -0700, Ralph Böhme via samba-technical
wrote:
> On Thu, Sep 14, 2017 at 05:31:54AM +0000, Gary Lockyer via samba-technical wrote:
> > Fix issues with the ownership of the writable end of the control pipe in
> > the standard process model. Which resulted in child processes not
> > detecting that the samba daemon master process had not terminated.
> 
> afaict this is not a problem in the standard process model, is it? There we
> correctly close the writable end of the pipe directly after forking the task
> services. When I look at the open pipe fds with lsof I only see it open in the
> main samba process:

> So generally, only with process model single we can end up inheriting the
> writable pipe fd, correct?

It comes about, as I read the code, if anything other than
process_standard.c calls fork() from the top level process.  That
mattered to the pre-fork work, because we were playing around with
having multiple process models active.  

That experiment was with having some processes run in prefork, with
others in standard, as a way of gradually introducing it. 

In the end that didn't happen (instead there is one model, with
behaviour changed via the supplied constraints), but having this global
variable hidden away here still doesn't feel right. 

However, the current behaviour still assumes that no other library or
anything else 'helpfully' calls fork(). 

I hope this clarifies things.   We should tidy up the commit message to
match this explanation.

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