Check all sendmail PID files
authorJamie Cameron <jcameron@webmin.com>
Sat, 12 May 2007 04:42:46 +0000 (04:42 +0000)
committerJamie Cameron <jcameron@webmin.com>
Sat, 12 May 2007 04:42:46 +0000 (04:42 +0000)
sendmail/sendmail-lib.pl

index 58dbe8e..29abebb 100644 (file)
@@ -500,7 +500,11 @@ else {
        # Use PID files, or check for process
        local @pidfiles = split(/\t+/, $config{'sendmail_pid'});
        if (@pidfiles) {
-               return &check_pid_file($pidfiles[0]);
+               foreach my $p (@pidfiles) {
+                       local $c = &check_pid_file($p);
+                       return $c if ($c);
+                       }
+               return undef;
                }
        else {
                return &find_byname("sendmail");