summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-08-19 00:32:20 +1000
committerDamien Miller <djm@mindrot.org>2006-08-19 00:32:20 +1000
commit99a648e59291d3adb39eeee4fa1f8a5b2ee2d769 (patch)
treebbf22dab3de359f05280994845c73c0a15bac9b9 /log.c
parenta1f6840a4fa1fd48ecbf5a3ebb2c3b18f3a6c587 (diff)
- deraadt@cvs.openbsd.org 2006/08/18 09:13:26
[log.c log.h sshd.c] make signal handler termination path shorter; risky code pointed out by mark dowd; ok djm markus
Diffstat (limited to 'log.c')
-rw-r--r--log.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/log.c b/log.c
index 6eac73743..32db0cb5f 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.c,v 1.38 2006/08/03 03:34:42 deraadt Exp $ */ 1/* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -137,6 +137,18 @@ error(const char *fmt,...)
137 va_end(args); 137 va_end(args);
138} 138}
139 139
140void
141sigdie(const char *fmt,...)
142{
143 va_list args;
144
145 va_start(args, fmt);
146 do_log(SYSLOG_LEVEL_FATAL, fmt, args);
147 va_end(args);
148 _exit(1);
149}
150
151
140/* Log this message (information that usually should go to the log). */ 152/* Log this message (information that usually should go to the log). */
141 153
142void 154void