speedup/cleanliness not worth enough, just always write to stderr
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 3 Mar 1993 10:31:00 +0000 (02:31 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Wed, 3 Mar 1993 10:31:00 +0000 (02:31 -0800)
SCCS-vsn: libexec/mail.local/mail.local.c 5.11

usr/src/libexec/mail.local/mail.local.c

index 44f43c1..af8147b 100644 (file)
@@ -12,7 +12,7 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)mail.local.c       5.10 (Berkeley) %G%";
+static char sccsid[] = "@(#)mail.local.c       5.11 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/param.h>
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -53,7 +53,7 @@ main(argc, argv)
        uid_t uid;
        char *from;
 
        uid_t uid;
        char *from;
 
-       openlog("mail.local", LOG_PERROR, LOG_MAIL);
+       openlog("mail.local", 0, LOG_MAIL);
 
        from = NULL;
        while ((ch = getopt(argc, argv, "df:r:")) != EOF)
 
        from = NULL;
        while ((ch = getopt(argc, argv, "df:r:")) != EOF)
@@ -279,9 +279,12 @@ err(isfatal, fmt, va_alist)
 #else
        va_start(ap);
 #endif
 #else
        va_start(ap);
 #endif
-#ifndef LOG_PERROR
+       /*
+        * Don't use LOG_PERROR as an openlog() flag to do this, it's
+        * not portable enough.
+        */
        (void)vfprintf(stderr, fmt, ap);
        (void)vfprintf(stderr, fmt, ap);
-#endif
+       (void)fprintf(stderr, "\n");
        vsyslog(LOG_ERR, fmt, ap);
        va_end(ap);
        if (isfatal)
        vsyslog(LOG_ERR, fmt, ap);
        va_end(ap);
        if (isfatal)