Skip to content
Snippets Groups Projects
Commit d4dad572 authored by SATOH Fumiyasu's avatar SATOH Fumiyasu
Browse files

Do kill(0, $pid) instead of check /proc/$pid for portability

parent ff9d4da6
No related branches found
No related tags found
No related merge requests found
......@@ -370,7 +370,7 @@ sub check_pidfile {
my $oldpid = readline($FH);
close($FH);
chomp $oldpid;
if (-d "/proc/$oldpid"){
if (kill(0, $oldpid)){
write_err("Already running as pid $oldpid");
exit(1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment