starting daemon from cgi/cgi process that is a daemon

starting daemon from cgi/cgi process that is a daemon

Post by korne » Thu, 24 Oct 1996 04:00:00



Hi,

Has anyone tried starting a daemon from a cgi program. I wrote
a daemon and it loads fine from the command line. The parent
process exits as it should and the child keeps running. But
when I try calling the program as a cgi program, the cgi
program (that is the parent process) doesn't seem to exit
until the child also exits. Does anyone know what I need to
do or how I need to write my daemon which is also a cgi
program. Now my browser hangs until the daemon terminates
instead of returning really quickly - or at least that is
what I have expected.

I tried using nested forks and setsid() but didn't seem to
affect anything.

All help would be greatly appriciated.
--
------------------------------------------------------------

 Chief Technology Officer (CTO)  Fax:   415-547-7735
 NetJet Communications           Phone: 415-547-7730
 Web Publisher to the World      http://www.netjet.com/
 ------------------------------------------------------------

 
 
 

1. cgi program which is a daemon/starting daemon from cgi

Hi,

Has anyone tried starting a daemon from a cgi program. I wrote
a daemon and it loads fin from the command line. The parent
process exits as it should and the child keeps running. But
when I try calling the program as a cgi program, the cgi
program (that is the parent process) doesn't seem to exit
until the child also exits. Does anyone know what I need to
do or how I need to write my daemon which is also a cgi
program. Now my browser hangs until the daemon terminates
instead of returning really quickly - ow at least that is
what I have expected.

I tried using nested forks and setsid() but didn't seem to
affect anything.

All help would be greatly appriciated.
--
------------------------------------------------------------

 Chief Technology Officer (CTO)  Fax:   415-547-7735
 NetJet Communications           Phone: 415-547-7730
 Web Publisher to the World      http://www.netjet.com/
 ------------------------------------------------------------

2. printer problem

3. Remote stop and start of daemons from a CGI program

4. online X-Windows manual?

5. /cgi-bin/phf /cgi-bin/test-cgi /cgi-bin/handler

6. 'play' program for Solaris?

7. start CGI within a CGI ???

8. Ahhhg Mount altering file access

9. Running cgi-bin program as a daemon

10. Communcation (CGI with Daemon)

11. Apache, CGI-Scripts and Daemons

12. Accessing a daemon from a cgi script

13. Forking a process in a daemon started by inetd