You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by fe...@apache.org on 2004/04/20 05:08:51 UTC

svn commit: rev 10115 - incubator/spamassassin/trunk/spamd

Author: felicity
Date: Mon Apr 19 20:08:50 2004
New Revision: 10115

Modified:
   incubator/spamassassin/trunk/spamd/spamd.raw
Log:
spamd would complain about a pidfile, even if it wasn't supposed to make one ...

Modified: incubator/spamassassin/trunk/spamd/spamd.raw
==============================================================================
--- incubator/spamassassin/trunk/spamd/spamd.raw	(original)
+++ incubator/spamassassin/trunk/spamd/spamd.raw	Mon Apr 19 20:08:50 2004
@@ -620,12 +620,14 @@
 $opt{'daemonize'} and daemonize();
 
 # Make the pidfile ...
-if ( defined $opt{'pidfile'} && open PIDF, ">$opt{'pidfile'}" ) {
-  print PIDF "$$\n";
-  close PIDF;
-}
-else {
-  warn "Can't write to PID file: $!\n";
+if (defined $opt{'pidfile'}) {
+  if (open PIDF, ">$opt{'pidfile'}") {
+    print PIDF "$$\n";
+    close PIDF;
+  }
+  else {
+    warn "Can't write to PID file: $!\n";
+  }
 }
 
 # should be done post-daemonize such that any files created by this