imapd's hang when maxchild count is reached

Dave McMurtrie dgm+ at pitt.edu
Thu Feb 6 11:30:25 EST 2003


On Thu, 6 Feb 2003, Henrique de Moraes Holschuh wrote:

> On Wed, 05 Feb 2003, Igor Brezac wrote:
> > > descriptors down to a child via a unix domain socket using sendmsg() or
> > > recvmsg(). In this case the master accepts the connection, passes the
> > > descriptor to a child via sendmsg(), closes the socket (the child should now
> > > be servicing it), and goes back to listening.
> >
> > This is not very portable.  ;(
>
> Would it work on Linux and Solaris? If the answer is yes to both, then I
> would vote for adding that suport conditional to a configure.in check.
>
> I guess if it can be done on Linux, the BSDs can almost certainly do it as
> well.

Would this actually work anyway?  If the parent were to pass a file
descriptor (by putmsg or any other means) to the child, isn't he really
just passing an integer value?  In other words, the integer value 5 in
process B is not the same thing as file descriptor 5 in process A.

When the parent initally forks the child, (if close on exec isn't set) the
child and parent will have the same file descriptors available to them.
Wouldn't any fd's opened in the parent after the child exec()s be unique
to the running instance of the parent process?

Just asking -- I could be wrong & it wouldn't be the first time.

Dave
--
Dave McMurtrie, Systems Programmer
University of Pittsburgh
Computing Services and Systems Development,
Development Services -- UNIX and VMS Services
717P Cathedral of Learning
(412)-624-6413





More information about the Info-cyrus mailing list