diff options
Diffstat (limited to 'log.c')
| -rw-r--r-- | log.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.46 2015/07/08 19:04:21 markus Exp $ */ +/* $OpenBSD: log.c,v 1.48 2016/07/15 05:01:58 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -176,6 +176,16 @@ sigdie(const char *fmt,...) _exit(1); } +void +logdie(const char *fmt,...) +{ + va_list args; + + va_start(args, fmt); + do_log(SYSLOG_LEVEL_INFO, fmt, args); + va_end(args); + cleanup_exit(255); +} /* Log this message (information that usually should go to the log). */ @@ -342,7 +352,7 @@ log_change_level(LogLevel new_log_level) int log_is_on_stderr(void) { - return log_on_stderr; + return log_on_stderr && log_stderr_fd == STDERR_FILENO; } /* redirect what would usually get written to stderr to specified file */ |
