[Catalyst] Self restarting test server for Win32!

Will Hawes info at whawes.co.uk
Wed Nov 2 12:02:37 CET 2005


----- Original Message -----
From: "Kiefer, Sascha" <sk at intertivity.com>
To: 'The elegant MVC web framework' <catalyst at lists.rawmode.org>
Sent: Wed,  2 Nov 2005 10:39:25 +0000
Subject: RE: [Catalyst] Self restarting test server for Win32!


> It's really not a easy one.
> I suggest to seperate to rewrite the HTTPServer by seperating the work in to
> scripts.
> One that runs the server, the other one that checks:
> 1. the server is still runing; if not, restart it
> 2. checks whether or not the files have changed

That's pretty much what we have now, it's just implemented via fork rather than as separate scripts. I'm convinced that the problem here is kill() after fork(), leading the parent process to exit without shutting down its sockets properly. Hence the "phantom" process listening on the server's port.

The solution to the problem would appear to be having the restarter notify the parent process whenever changes occur, rather than killing it. This would allow the parent to perform a graceful exit and close its sockets properly. I have something in mind to do just this and will post to the list once things have progressed a bit.

wh




More information about the Catalyst mailing list