title: Call an executable from C++, and wait until it is done, on Linux
body: <p>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?</p>
  
  <p>I'm writing this for a Linux system, but if possible, I'd like it to be portable. Anyway, any help would be appreciated.</p>