system call

  • Thread starter Christian Christmann
  • Start date
C

Christian Christmann

Hi,

from my C++ program I invoke some binaries by
"system( COMMAND )".
Some of the binaries need couple of times to finish their execution
and create at the end some files which are required by some binaries
I invoke subsequently with "system".

How does my C++ program handle that situation. Does it wait till the
first system call is finished and than continues or does it invoke the
binaries without bothering about the state of the predecessors?

Thank you
Chris
 
A

Andre Kostur

Hi,

from my C++ program I invoke some binaries by
"system( COMMAND )".
Some of the binaries need couple of times to finish their execution
and create at the end some files which are required by some binaries
I invoke subsequently with "system".

How does my C++ program handle that situation. Does it wait till the
first system call is finished and than continues or does it invoke the
binaries without bothering about the state of the predecessors?

As I recall... system() waits for the command to complete, and returns the
"error code" from the call. So if your command outputs some files, those
files will exist by the time system() returns.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,123
Latest member
Layne6498
Top