blob: f6c8d521079229ab1113e826a01124bbd941e2c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <stdio.h>
#include <sys/stat.h>
#include <limits.h>
#include "proc.h"
#include "fs.h"
int process_exists(pid_t pid)
{
char path[PATH_MAX];
snprintf(path, PATH_MAX, "/proc/%li", pid);
return isDir(path);
}
|