Check for an actual /proc file, not directory, in pid_alive()

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2020-02-26 11:40:18 +01:00
1 parent 6ab9c8fad6
commit 9052248127
1 file changed
+1 -1
+1 -1
View File
@@ -45,7 +45,7 @@ int pid_alive(pid_t pid)
{
char name[24]; /* Enough for max pid_t */
snprintf(name, sizeof(name), "/proc/%d", pid);
snprintf(name, sizeof(name), "/proc/%d/status", pid);
return fexist(name);
}