Process hierarchy on a DC?
abartlet at samba.org
Thu Apr 27 23:11:02 UTC 2017
On Thu, 2017-04-27 at 15:15 -0700, Jeremy Allison wrote:
> On Fri, Apr 28, 2017 at 09:57:26AM +1200, Andrew Bartlett wrote:
> > Yeah, I think that might be the right thing in this case. SambaXP
> > isn't the time to be rushing on this, and I think threading this
> > though
> > the various constraints (keeping the other benefits but also the
> > process group) is going to be quite tricky.
> > Hopefully we can get a good testcase for this, perhaps also a unit
> > test
> > running a small psudo-server for interactions with the process
> > model
> > code?
> There is a test case for tfork as a standalone function
> git show 3ce1060f781ff5b97582542861f83129b16a8bbf
> but not when run from inside samba_runcmd_send(). What
> should this look like do you think ?
For a start, I was thinking it should open a pipe and pass it to the
child command. That child command should report back the process group
it is in, then wait.
Then we should terminate the process group from the parent and check
the pipe is closed.
Likewise we should run the command with an argument as to what exit
code it should use, and check we get that back via waitpid() all the
way to samba_runcmd_recv().
Finally, test whatever triggered that panic Volker saw.
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