in reply to Running detached processes with Activeperl under IIS
All but the last two wait for the exe to finish before completing the script ...
You're misinterpreting the symptoms.
The waiting occurs within the web server itself. Here's why.
When a webserver starts a cgi script, it supplies (via inheritance) that script with it standard handles: stdin; stdout; and stderr. It then waits for those handles to close before it transmits the output from the script to the browser.
But when you call system 1, ... within the cgi, that child process inherits its standard handles from the cgi script. So, even though your script finishes and perl.exe exits, the standard handles it inherited are still being held open by the new process. So the webserver continues to wait until those handles are closed, which won't be until that new process (MedicaidEHRService.exe) completes.
Might work if you added the /b parameter to the start command.
But, and I can only speculate here as I don't have that particular executable, the program you are running must need the one or more of the standard handles for some reason to work correctly, and fails because they are closed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Running detached processes with Activeperl under IIS
by Jules (Initiate) on May 12, 2009 at 13:21 UTC | |
by BrowserUk (Patriarch) on May 12, 2009 at 13:32 UTC | |
by Jules (Initiate) on May 12, 2009 at 15:37 UTC | |
by ikegami (Patriarch) on May 12, 2009 at 16:17 UTC | |
by Jules (Initiate) on May 12, 2009 at 16:47 UTC | |
by BrowserUk (Patriarch) on May 13, 2009 at 02:45 UTC | |
|