Re: Long Running Process - make it a daemon?

2006-01-10 Thread JupiterHost.Net
Hello, our CMS create sometimes long runnig tasks. This Tasks we start with the following code: `/usr/bin/perl -e 'use Modul; Modul-function($arg);' /dev/null `; This works. Apache returns the html-page and the long running function goes into the background. But if we restart Apache all

Long Running Process - make it a daemon?

2006-01-06 Thread Jens Gassmann
Hi, our CMS create sometimes long runnig tasks. This Tasks we start with the following code: `/usr/bin/perl -e 'use Modul; Modul-function($arg);' /dev/null `; This works. Apache returns the html-page and the long running function goes into the background. But if we restart Apache all

Re: Long Running Process - make it a daemon?

2006-01-06 Thread Enno
You may want to look at Apache2::SubProcess. Basically you just need to use POSIX 'setsid' (thats what Proc::Daemon uses too). just dont forget to detach stdin/stdout/stderr, and chdir '/' in the daemonized process to avoid problems. Enno On Fri, 6 Jan 2006, Jens Gassmann wrote: Hi, our