in reply to Re: Re: Re: Forking in a CGI program on Windows systems
in thread Forking in a CGI program on Windows systems

I do appreciate that you were trying to help... Unfortunately, the above would not work. Just for the notes - quote from the Camel Book (3rd edition, p. 811) - "The system function works exactly like exec, except that system does a fork first and then, after the exec, waits for the executed program to complete." That's exactly what prevents me from envoking an external program using exec or system - I need my CGI program to completely finish and exit BEFORE the child process finishes.

There's a similar post "Understanding fork" by neiwatson. I'll try some of the suggestions offered there, even though I'm not sure to what extent they are applicable to Windows systems. I was just wondering if anyone had experience forking on Windows systems from a CGI program (it's important for it to be a CGI program, i.e. run on a web server)

  • Comment on Re: Re: Re: Re: Forking in a CGI program on Windows systems

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Forking in a CGI program on Windows systems
by Mr. Muskrat (Canon) on Nov 08, 2002 at 20:30 UTC

    From perlfaq8:

    How come exec() doesn't return?
    Because that's what it does: it replaces your currently running program with a different one. If you want to keep going (as is probably the case if you're asking this question) use system() instead.

    So your current program would completely finish if you put the exec() at the end...