title: How to get pid of process executed with system() command in c++
body: <p>When we use <code>system()</code> command, program wait until it complete but I am executing a <code>process</code> using <code>system()</code> and using load balance server due to which program comes to next line just after executing system command. Please note that that <code>process</code> may not be complete.</p>
  
  <pre><code>system("./my_script");
  
  // after this I want to see whether it is complete or not using its pid.
  // But how do i Know PID?
  IsScriptExecutionComplete();
  </code></pre>