]> andersk Git - openssh.git/blobdiff - log.c
- djm@cvs.openbsd.org 2006/08/18 14:40:34
[openssh.git] / log.c
diff --git a/log.c b/log.c
index 871bc2c428b3b0146bbe1c794340e623993acde8..32db0cb5f52ddd7ab48493e2ea8ed7f5c8f13e41 100644 (file)
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.37 2006/08/01 23:22:47 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
@@ -36,6 +36,8 @@
 
 #include "includes.h"
 
+#include <sys/types.h>
+
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -46,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;
@@ -135,6 +137,18 @@ error(const char *fmt,...)
        va_end(args);
 }
 
+void
+sigdie(const char *fmt,...)
+{
+       va_list args;
+
+       va_start(args, fmt);
+       do_log(SYSLOG_LEVEL_FATAL, fmt, args);
+       va_end(args);
+       _exit(1);
+}
+
+
 /* Log this message (information that usually should go to the log). */
 
 void
This page took 0.044597 seconds and 4 git commands to generate.