KDC worker processes project

Nicolas Williams Nicolas.Williams at oracle.com
Fri Sep 17 15:31:38 EDT 2010


On Fri, Sep 17, 2010 at 03:20:58PM -0400, Greg Hudson wrote:
> > It shouldn't be that tough to do.
> 
> It's too tough for me to do in the timeline we have available.  I won't
> object if you want to do the work.
> 
> The plan you suggest is not simple to carry out.  Currently the
> supervisor spends its time a wait() loop in the KDC's main.c not the
> select() loop of net-server.c.

That's the flaw though...  It really should wait in an I/O loop.  The
wait should happen as a result of processing an I/O event.

One obvious and trivial way to do _that_ is to create a pipe between the
master and each child, with each holding one end-point of the pipe.  The
master will poll on read events from its ends of those pipes.  When a
child exits the parent will get an error event and will trivially know
which child exited.

Another obvious and trivial way to do this is to have a pipe in the
master that the SIGCHLD handler writes a single byte into every time it
runs.  The master will poll on reads on the other side of that pipe and
reap a child per-event.

OpenSSH, for example, uses (or used to use) the latter.

Nico
-- 



More information about the krbdev mailing list