On Thu Jan 05 14:46:38 2012, TODDR wrote:
Show quoted text> On Wed Jan 04 16:11:53 2012, BAREFOOT wrote:
> > This also breaks when used with Test::Command (see attached).
> Perhaps
> > the original patch submitter should be contacted to see if he can
> > explain the bug? Otherwise, at this point it seems like it's
> hurting
> > more people than it's helping.
>
> The short answer from Catalyst crew is that you're not supposed to run
> binaries from within a
> fastcgi app. While their purist attitudes annoyed me, especially since
> they refused to discuss the
> point, I begrudgingly decided to go with the flow. FastCGI operates
> via STDIN/STDOUT, etc.
> There is no easy way to subvert this in order to call programs within
> a catalyst app. It's a fairly
> decent question to ask: Is it safe to run external binaries from a
> fastcgi script?
>
> In my case, I needed to kick off long running processes. What I ended
> up doing was creating a
> separate process outside of fastcgi and apache. The process runs under
> Net::Daemon, validates
> a secret key and then runs what it's told to do. Even if you need to
> be interactive, this should
> be possible if you use this model.
>
I decided to remove the code in v1.06, mostly because I didn't fully
understand what it did, and because I have failing tests if it stays.
One option I didn't explore yet, is to have an import parameter to do
the filehandle swapping when asked for it. It might be worth a try if
both behaviour are needed.
-- BooK