Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better pid file error reporting under syslog for psadwatchd

  • Loading branch information...
commit b0bd270fd188ea1393f2f6af044fe554c2666872 1 parent 693b3b2
@mrash authored
Showing with 8 additions and 0 deletions.
  1. +8 −0 psadwatchd.c
View
8 psadwatchd.c
@@ -216,6 +216,9 @@ static void check_process(
#ifdef DEBUG
fprintf(stderr, "[-] Could not open pid file: %s\n", pid_file);
#endif
+ snprintf(syslog_str, MAX_MSG_LEN,
+ "could not open pid file: %s on %s", pid_file, hostname);
+ slogr("psad(psadwatchd)", syslog_str);
/* the pid file must not exist (or we can't read it), so
* setup to start the appropriate process */
restart = 1;
@@ -231,8 +234,13 @@ static void check_process(
#endif
fclose(pidfile_ptr);
+ snprintf(syslog_str, MAX_MSG_LEN,
+ "could not read pid file: %s on %s", pid_file, hostname);
+ slogr("psad(psadwatchd)", syslog_str);
+
/* see if we need to give up */
incr_syscall_ctr(pid_name, max_retries);
+
return;
}

0 comments on commit b0bd270

Please sign in to comment.
Something went wrong with that request. Please try again.