in reply to system() does not wait for terminal.exe to complete executing on Windows
There is something wrong with the logic of your script. The wait is useless here and entirely unnecessary.
As coded, system should not return until the program started completes. I cannot think of any circumstance where that would not be the case.
For example, if you run this:
perl -le"$|++; for( 1, 2){ print system qq[C:/windows/system32/notepad +.exe]; print'hi'}"
You will see that you have to close notepad.exe before control returns to the perl script. It then prints 'hi' and the return value from the command. You have to close notepad twice before the above script completes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: system() does not wait for terminal.exe to complete executing on Windows
by spranav (Initiate) on Apr 07, 2010 at 22:48 UTC | |
by BrowserUk (Patriarch) on Apr 07, 2010 at 23:03 UTC |