[Catalyst] Self restarting test server for Win32!
Will Hawes
info at whawes.co.uk
Tue Nov 1 20:46:41 CET 2005
----- Original Message -----
From: "Kiefer, Sascha" <sk at intertivity.com>
To: 'The elegant MVC web framework' <catalyst at lists.rawmode.org>
Sent: Tue, 1 Nov 2005 19:27:13 +0000
Subject: RE: [Catalyst] Self restarting test server for Win32!
> but maybe it helps to check the returnvalues of bind and listen. It may that
> the new server is
> started before the old server process is terminated.
I thought that was the cause too - and probably is with the patch I posted. However, in my testing I am now killing the parent process before my call to system() with the same result. I'm pretty certain it's a case of the socket not being released properly when the first server shuts down. This could have something to do with filehandles/sockets being shared when you fork() - I think the use of kill() might mean that there are references to them still hanging around.
Incidentally (and OT), I think the code in the test server could be simplified somewhat using IO::Socket.
wh
More information about the Catalyst
mailing list