How to get child PID in C?

后端 未结 5 674
失恋的感觉
失恋的感觉 2020-12-31 03:10

I\'m creating child processes in a for-loop. Inside the child process, I can retrieve the child PID with getpid().

However, for some reas

5条回答
  •  自闭症患者
    2020-12-31 03:51

    There are two main functions to get the process id of parent process and child. getpid() and getppid()

提交回复
热议问题