如下图所示:源代码和运行结果对比,为什么子进程输出的getppid()与父进程输出的getpid()不一样呢?
找到答案了!(转载)
https://blog.csdn.net/Oerror_/article/details/104361264