📜  检查 pid 是否存在 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:34.084000             🧑  作者: Mango

代码示例1
#include 
[...]
struct stat sts;
if (stat("/proc/", &sts) == -1 && errno == ENOENT) {
  // process doesn't exist
}