子进程怎么获得父进程的PID号啊

cosmos701 2011-08-07 03:00:12
子进程怎么获得父进程的PID号啊
有什么函数吗?或者用什么方法获得
...全文
241 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cosmos701 2011-08-07
  • 打赏
  • 举报
回复
谢谢哦~~~
linux_ljm 2011-08-07
  • 打赏
  • 举报
回复
getpid() returns the process ID of the current process. (This is often used by routines that generate unique temporary filenames.)
getppid() returns the process ID of the parent of the current process.
flylee 2011-08-07
  • 打赏
  • 举报
回复
getppid()

23,114

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧