Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道getppid检索底层程序的父 pid,但是你怎么能从那个程序中分辨出来呢?我在 中找不到任何有用的东西/proc/[pid],或者我可以使用任何有用的 API?
getppid
/proc/[pid]
更新
我的意思是,我正在用另一个进程检查这些进程,所以 getppid 在这里不起作用
它是 /proc/[pid]/stat 中的第四个字段。它记录在手册页proc(5)中。
proc(5)
该信息存在于 中/proc/<pid>/stat,并且更易读于/proc/<pid>/status:
/proc/<pid>/stat
/proc/<pid>/status
$ grep PPid /proc/$$/status PPid: 10615 $ awk '{print $4}' /proc/$$/stat 10615 $ ps -ef ... me 10616 10615 0 11:04 pts/2 00:00:00 bash
我一直在尝试想出一个表格,学员可以在其中申请化妆课程,并且当他们提交时,数据将存储在数据库中。我是 android 编程新手,我也在使用 php 连接到数据库。
我不知道代码哪里出错了
这是我的错误:
08-01 1