[Catalyst] Self restarting test server for Win32!
Will Hawes
info at whawes.co.uk
Mon Oct 31 16:36:32 CET 2005
----- Original Message -----
From: Andy Grundman <andy at hybridized.org>
To: The elegant MVC web framework <catalyst at lists.rawmode.org>
Sent: Mon, 31 Oct 2005 14:23:24 +0000
Subject: Re: [Catalyst] Self restarting test server for Win32!
> Will Hawes wrote:
> > Attached is a patch to Catalyst::Engine::HTTP (from the 5.49_02 release) to
> make the self-restarting test server work on Win32.
>
> Thanks, this looks like a nice and simple solution. I'll give it a test
> and apply if all goes well. :)
>
> One question I have, will cmd.exe always be the parent process? What
> will happen if someone starts the server from, say, a batch file in
> Explorer? Probably unlikely that someone will go to the trouble, but we
> wouldn't want to kill something other than cmd.exe.
That's an interesting point and not something I'd considered. I'm pretty sure that a batch file would be executed by cmd.exe and that the batch file itself wouldn't be considered a process by the OS, but I'll have to check.
On another note, I've been testing this patch a bit more today and I'm getting some unexpected results. The server restarts and is functional the first time I modify a file. On the second modification, the server restarts but seems not to bind correctly to port 3000. Port 3000 is totally non responsive unless I close the command window and open a new one.
It's as though sockets are not released properly by Perl when you kill perl.exe or a parent process. I don't know why the restart should work once and then fail and I haven't worked out what to do about it yet.
More information about the Catalyst
mailing list