in reply to run a background process

For a CGI process, you need to fork, have the parent return a standard response, and have the child close STDOUT. You're not doing anything in the right order in your code. I have some examples of using CGI with fork in my columns: read more there and get some stealable code.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: run a background process
by Anonymous Monk on Jul 14, 2005 at 23:53 UTC
    Thank you! I forgot completely about close *bonk self*

    This worked:

    exit if fork(); close STDOUT; close STDERR; chdir './somewhere'; exec './somestuff';