1107 |
ASSERT(pidfile); |
ASSERT(pidfile); |
1108 |
|
|
1109 |
if(! File_exist(pidfile)) { |
if(! File_exist(pidfile)) { |
1110 |
log("%s: pidfile '%s' does not exist\n",prog, pidfile); |
DEBUG("%s: pidfile '%s' does not exist\n",prog, pidfile); |
1111 |
return(FALSE); |
return FALSE; |
1112 |
} |
} |
1113 |
if(! File_isFile(pidfile)) { |
if(! File_isFile(pidfile)) { |
1114 |
log("%s: pidfile '%s' is not a regular file\n",prog, pidfile); |
log("%s: pidfile '%s' is not a regular file\n",prog, pidfile); |
1115 |
return(FALSE); |
return FALSE; |
1116 |
} |
} |
1117 |
if((file= fopen(pidfile,"r")) == (FILE *)NULL) { |
if((file= fopen(pidfile,"r")) == (FILE *)NULL) { |
1118 |
log("%s: Error opening the pidfile '%s' -- %s\n", |
log("%s: Error opening the pidfile '%s' -- %s\n", |
1119 |
prog, pidfile, STRERROR); |
prog, pidfile, STRERROR); |
1120 |
return(FALSE); |
return FALSE ; |
1121 |
} |
} |
1122 |
fscanf(file, "%d", &pid); |
fscanf(file, "%d", &pid); |
1123 |
fclose(file); |
fclose(file); |