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.
In reply to Re: Running detached processes with Activeperl under IIS
by BrowserUk
in thread Running detached processes with Activeperl under IIS
by Jules
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |