[Catalyst] New restarter code in Catalyst::Devel 1.14_01

Dave Rolsky autarch at urth.org
Tue May 19 14:19:46 GMT 2009


On Tue, 19 May 2009, Rodrigo wrote:

> Since I needed to have the restarter working badly on that machine in
> particular, I quickly patched the code with Proc::Background. Something like
> this:
>
> sub _fork_and_start() {
>   my $proc = new Proc::Background("perl $0");  # I'm writing this from
> memory; not this exactly, there were more args...
>   my $pid = $proc->pid;
> ...}

Doing this pretty much defeats the point of the new restarter code, which 
was to avoid starting the app from scratch each time.

> I think I put threads / async { } somewhere in there before using
> Proc::Background but I got an error... and don't recall which. Killing the
> thread requires it to die from the inside, sending it a signal of some sort.

Right, that's where I got stuck.

> Couldn't the restarter be subclassed then changed in myapp_script.pl through
> an %ENV variable?

Sure, but the trick is to come up with something that works reliably on 
Windows, and ideally, has the benefits of the new restarter code.


-dave

/*============================================================
http://VegGuide.org               http://blog.urth.org
Your guide to all that's veg      House Absolute(ly Pointless)
============================================================*/



More information about the Catalyst mailing list