in reply to Proc::Daemon not detaching
Hi Dave,
I used to start daemons with Apache 1.x.x, but those days seem over. With Apache 2.x.x, I have not been able to do this. Maybe there is a Apache configuration parameter to allow this, but I have had to change a lot of cgi scripts because of this.
My solution was to start a long running daemon before or at Apache startup that monitors a file for commands from the cgi scripts. This daemon does not execute the commands, but forks a copy to execute the command. Note: Make sure you put a 'sleep' or 'usleep' in the test loop.
Apache2 doesn't know the daemon exists, and it works.
Regards...Ed
"Well done is better than well said." - Benjamin Franklin
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Proc::Daemon not detaching (exec perl)
by tye (Sage) on Mar 20, 2014 at 14:53 UTC |