diff --git a/logging.c b/logging.c index c04f160c2..fb9ff9cf0 100644 --- a/logging.c +++ b/logging.c @@ -395,10 +395,12 @@ log_error(va_alist) /* * Tell the user. */ - if (flags & USE_ERRNO) - warn("%s", message); - else - warnx("%s", message); + if (!ISSET(flags, NO_STDERR)) { + if (flags & USE_ERRNO) + warn("%s", message); + else + warnx("%s", message); + } /* * Send a copy of the error via mail. diff --git a/logging.h b/logging.h index 845d39238..add20a55d 100644 --- a/logging.h +++ b/logging.h @@ -34,6 +34,7 @@ #define USE_ERRNO 0x02 #define NO_MAIL 0x04 #define NO_EXIT 0x08 +#define NO_STDERR 0x10 /* * Maximum number of characters to log per entry. The syslogger