[16340] in Kerberos_V5_Development

home help back first fref pref prev next nref lref last post

Re: KDC worker processes project

daemon@ATHENA.MIT.EDU (Nicolas Williams)
Fri Sep 17 15:32:08 2010

Date: Fri, 17 Sep 2010 14:31:38 -0500
From: Nicolas Williams <Nicolas.Williams@oracle.com>
To: Greg Hudson <ghudson@mit.edu>
Message-ID: <20100917193138.GY3982@oracle.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <1284751258.5992.1810.camel@ray>
Cc: Ken Raeburn <raeburn@mit.edu>, "krbdev@mit.edu Dev List" <krbdev@mit.edu>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: krbdev-bounces@mit.edu

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
-- 
_______________________________________________
krbdev mailing list             krbdev@mit.edu
https://mailman.mit.edu/mailman/listinfo/krbdev

home help back first fref pref prev next nref lref last post