{
if (access(pid_filename, F_OK) == 0) {
/* Check if the existing process is still alive. */
- pid_t pidv;
FILE *pf;
pf = fopen(pid_filename, "r");
return -1;
}
+#ifndef OS_WIN32
+ pid_t pidv;
if (fscanf(pf, "%d", &pidv) == 1 && kill(pidv, 0) == 0) {
SCLogError(SC_ERR_INITIALIZATION,
"pid file '%s' exists and Suricata appears to be running. "
"Aborting!", pid_filename);
- } else {
+ } else
+#endif
+ {
SCLogError(SC_ERR_INITIALIZATION,
"pid file '%s' exists but appears stale. "
"Make sure Suricata is not running and then remove %s. "