Based on the above responses (and the fact that you are using Windows), maybe using threads might be a better solution for you?
See BrowserUK's posts for some good examples. Try this one which uses threads to run system commands or this one which uses Thread::Queue (but no system command).
In reply to Re: exec vs. system
by tokpela
in thread exec vs. system
by Microcebus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |