I’m trying to write a program which, at some point, needs to invoke an external application via the system and wait until that other executable finishes. I pretty much want a C++ version of the python subprocess.call(…) method. I know that system() can invoke a command via the shell, but I don’t know if it is able to block until the commands terminate. Anyone know the right way to do this?
I’m writing this for a Linux system, but if possible, I’d like it to be portable. Anyway, any help would be appreciated.
system() waits for the command to finish:
http://linux.die.net/man/3/system