[dancer-users] How can a fork+system() Dancer app not create zombie processes?

Andrew Beverley andy at andybev.com
Thu Jun 29 09:41:23 BST 2017


On Thu, 29 Jun 2017 17:35:07 +1000 Nathan Bailey wrote:
> > >    I want to send my Dancer2 TT page as an email *and* continue to
> > > generate a normal web response.
> > >
> > > This forking discussion seems like an excellent approach.
> >
> > I'm not convinced - it seems like overkill to me.
> >
> 
> How would I generate two outputs from the one process otherwise? More
> specifically, how do I invoke the same route twice?

Ah, I missed that bit. Nonetheless, can you not just call the template
keyword directly, generate the email content and send? Then generate
the page content and return that from the route handler. The template
keyword doesn't actually end anything: it just produces content which
normally gets returned.

> Have you loaded a suitable guard module (e.g. Guard or Scope::Guard)?
> > Otherwise (from memory) the application will exit before it raises an
> > exception of the missing guard function.
> >
> 
> Yes, I installed Guard. I will try its debug mode to see if it tells me
> more about why it's failing.

Did you load it in your application as well? e.g. somewhere in your
code before it's called:

  use Guard;

Andy


More information about the dancer-users mailing list