[Web-SIG] Web Site Process Bus

Joseph Tate jtate at rpath.com
Tue Jun 26 04:51:16 CEST 2007

On Monday 25 June 2007 20:32:38 Chad Whitacre wrote:
> All,
> >> Now I'm really confused.  What is the idle state *for*?
> >
> > One concrete use case could be a test suite ...
> Is this also where Joe's comment in Dallas fits, namely, the case
> where you want to hold open a socket while restarting a child
> process so as not to drop connections?

It's not so much a desire to not drop connections as to keep the socket file 
descriptor during a restart to prevent an asynchronous kernel call 
(socket.close()) from preventing your new process from reopening that socket.  
The frequent work around is to insert an arbitrary sleeps or loops on the 
socket.bind call, but I store the file descriptor as an environment variable 
and reconnect to the existing socket after the exec call.  This is a problem 
on Linux at least, and probably all POSIX systems.  Having the kernel queue 
up connections is an added bonus.

I do think this is a good example of what the IDLE state could be used for.

Joseph Tate
Software Engineer
rPath Inc.
(919) 851-3984 x2106

More information about the Web-SIG mailing list