]> arthur.barton.de Git - netatalk.git/commitdiff
papd -d doesn't write to stderr. From Martin Nagy
authordidg <didg>
Thu, 7 Aug 2008 07:47:44 +0000 (07:47 +0000)
committerdidg <didg>
Thu, 7 Aug 2008 07:47:44 +0000 (07:47 +0000)
etc/papd/main.c

index 724815c395da7cbe55e2e8eb1fbadb0c1e735cf3..03d3961c969edd3b09de5c876980c062421862a7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.21 2007-05-14 18:38:52 didg Exp $
+ * $Id: main.c,v 1.22 2008-08-07 07:47:44 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -260,7 +260,7 @@ int main( ac, av )
 
     switch (server_lock("papd", pidfile, debug)) {
     case 0: /* open a couple things again in the child */
-      if ((c = open("/", O_RDONLY)) >= 0) {
+      if (!debug && (c = open("/", O_RDONLY)) >= 0) {
        dup2(c, 1);
        dup2(c, 2);
       }
@@ -287,7 +287,8 @@ int main( ac, av )
     openlog( p, LOG_PID );
 #else /* ultrix */
     set_processname(p);
-    syslog_setup(log_debug, logtype_default, logoption_ndelay|logoption_pid, logfacility_lpr );
+    syslog_setup(log_debug, logtype_default, logoption_ndelay | logoption_pid |
+               debug ? logoption_perror : 0, logfacility_lpr );
 #endif /* ultrix */
 
     LOG(log_info, logtype_papd, "restart (%s)", version );