Permalink
Browse files

write syslog message if an existing psad is already running

  • Loading branch information...
1 parent 53cd31a commit 693b3b23f93d3b71502dd45e98358a028cb683e1 @mrash committed Feb 8, 2014
Showing with 5 additions and 2 deletions.
  1. +5 −2 psad
View
7 psad
@@ -10729,8 +10729,11 @@ sub is_running() {
### make sure pid is unique
sub unique_pid() {
my $pidfile = shift;
- die "[*] $0 process is already running! Exiting.\n"
- if &is_running($pidfile);
+ if (&is_running($pidfile)) {
+ my $msg = "Another $0 process is already running, exiting.";
+ &sys_log($msg);
+ die "[*] $msg";
+ }
return;
}

0 comments on commit 693b3b2

Please sign in to comment.