im running a file using system, but i dont know how to get the pid of that process, does anybody know it?
thnx!
im running a file using system, but i dont know how to get the pid of that process, does anybody know it?
thnx!
You might want to use fork and exec instead of system. The child process pid will be returned from fork to the parent process.
Edit in case it wasn't obvious, my answer was before the author tagged his post with windows. My answer is specific to Linux.