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)
============================================================*/

_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to