in reply to system command not working after connection with cgi breaks

I'm not sure if what you find is a standard behavior and if it's possible avoiding it but, in a similar situation, I resolved the problem executing a at now ... command instead of forking. It's a hack, but it works.

Careful with that hash Eugene.

Replies are listed 'Best First'.
Re^2: system command not working after connection with cgi breaks
by advait (Beadle) on Jun 23, 2008 at 17:52 UTC
    can you please elaborate on at now command

      You make a system call to the at unix command (see man at).

      In our context, if you execute at now <"your_command" the at command returns immediately, so you can terminate your cgi script but the command "your_command" is executed in another process that is not a child of your process, but of cron deamon. Actually at schedules a single execution of your_command via crond.

      Careful with that hash Eugene.