]> andersk Git - openssh.git/blobdiff - log.c
- (tim) [configure.ac] Move CHECK_HEADERS test before platform specific
[openssh.git] / log.c
diff --git a/log.c b/log.c
index 68cbfc7d9908eeaaac89cd41a8a29503dbf16aab..7f8867482d95e55d9cd6ff471cf504163c31d775 100644 (file)
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.36 2006/07/26 13:57:17 stevesk Exp $ */
+/* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 
 #include "includes.h"
 
+#include <sys/types.h>
+
 #include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <syslog.h>
@@ -45,8 +48,8 @@
 # include <vis.h>
 #endif
 
-#include "log.h"
 #include "xmalloc.h"
+#include "log.h"
 
 static LogLevel log_level = SYSLOG_LEVEL_INFO;
 static int log_on_stderr = 1;
@@ -134,6 +137,20 @@ error(const char *fmt,...)
        va_end(args);
 }
 
+void
+sigdie(const char *fmt,...)
+{
+#ifdef DO_LOG_SAFE_IN_SIGHAND
+       va_list args;
+
+       va_start(args, fmt);
+       do_log(SYSLOG_LEVEL_FATAL, fmt, args);
+       va_end(args);
+#endif
+       _exit(1);
+}
+
+
 /* Log this message (information that usually should go to the log). */
 
 void
This page took 0.034308 seconds and 4 git commands to generate.