launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #00967
Re: Windmill and uuid listening on the ports we're using
On Wed, Sep 16, 2009 at 09:31:50AM -0400, Francis J. Lacoste wrote:
> On September 16, 2009, Bjorn Tillenius wrote:
> > On Wed, Sep 16, 2009 at 09:15:05AM -0400, Francis J. Lacoste wrote:
> > > On September 15, 2009, Bjorn Tillenius wrote:
>
> >
> > > > Well, actually we do have this problem. I'm making the Windmill tests
> > > > run in a subclass of AppServerLayer, which starts an SMTP server. After
> > > > windmill and the SMTP server is stopped, libuuid has started listening
> > > > on the port the SMTP server used. I've worked around it for now by
> > > > stopping the server before starting Windmill, since I don't think any
> > > > tests use it, but I'd like to solve this properly.
> > >
> > > Since that's in our code, we should probably do the same thing. Catch
> > > the port already in use and find another port.
> >
> > Yeah, I'll look into it.
> >
> > BTW, I did find out why this is happening. Windmill uses libuuid, which
> > forks a process that inherits the parent process' file descriptors,
> > including the open ports.
> >
>
> Ah, then this is a bug in libuuid I guess. It should closes all unused open
> filedescriptor after forking. I guess it doesn't do an exec after the fork,
> otherwise they would automatically be closed.
Maybe it's not a bug in libuuid. I think it does an exec, but FD_CLOEXEC
isn't set on the file descriptor. I'll see if I can fix it.
--
Björn Tillenius | https://launchpad.net/~bjornt
References