mirror of
https://github.com/troglobit/finit.git
synced 2026-11-29 21:08:21 +00:00
Check for an actual /proc file, not directory, in pid_alive()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
6ab9c8fad6
commit
9052248127
1 file changed
+1
-1
@@ -45,7 +45,7 @@ int pid_alive(pid_t pid)
|
|||||||
{
|
{
|
||||||
char name[24]; /* Enough for max pid_t */
|
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);
|
return fexist(name);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user