summaryrefslogtreecommitdiff
path: root/log.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-07-23 21:01:56 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-07-23 21:01:56 +0000
commit264ee307a8fd171dbb44121ec05b83f4143408cf (patch)
tree879766e789662f58ab0b8b7482126f743072e6c2 /log.c
parent6f52b3e39958dde417eacd9ca8fb513a3ea5b769 (diff)
downloadopenssh-git-264ee307a8fd171dbb44121ec05b83f4143408cf.tar.gz
- markus@cvs.openbsd.org 2002/07/19 15:43:33
[log.c log.h session.c sshd.c] remove fatal cleanups after fork; based on discussions with and code from solar.
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 8c09ec1b..96626d7d 100644
--- a/log.c
+++ b/log.c
@@ -34,7 +34,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: log.c,v 1.23 2002/07/06 01:00:49 deraadt Exp $");
+RCSID("$OpenBSD: log.c,v 1.24 2002/07/19 15:43:33 markus Exp $");
#include "log.h"
#include "xmalloc.h"
@@ -223,6 +223,18 @@ fatal_remove_cleanup(void (*proc) (void *context), void *context)
(u_long) proc, (u_long) context);
}
+/* Remove all cleanups, to be called after fork() */
+void
+fatal_remove_all_cleanups(void)
+{
+ struct fatal_cleanup *cu, *next_cu;
+
+ for (cu = fatal_cleanups; cu; cu = next_cu) {
+ next_cu = cu->next;
+ xfree(cu);
+ }
+}
+
/* Cleanup and exit */
void
fatal_cleanup(void)