我试过谷歌,但发现getppid()哪个获得当前进程的父pid .
getppid()
我需要类似的东西getppid(some_other_pid),有这样的东西吗?基本上取一些进程的pid并返回父进程'pid.
getppid(some_other_pid)
linux operating-system process
linux ×1
operating-system ×1
process ×1