diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2002-07-23 21:01:56 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2002-07-23 21:01:56 +0000 |
commit | 264ee307a8fd171dbb44121ec05b83f4143408cf (patch) | |
tree | 879766e789662f58ab0b8b7482126f743072e6c2 /log.c | |
parent | 6f52b3e39958dde417eacd9ca8fb513a3ea5b769 (diff) |
- 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.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -34,7 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include "includes.h" | 36 | #include "includes.h" |
37 | RCSID("$OpenBSD: log.c,v 1.23 2002/07/06 01:00:49 deraadt Exp $"); | 37 | RCSID("$OpenBSD: log.c,v 1.24 2002/07/19 15:43:33 markus Exp $"); |
38 | 38 | ||
39 | #include "log.h" | 39 | #include "log.h" |
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
@@ -223,6 +223,18 @@ fatal_remove_cleanup(void (*proc) (void *context), void *context) | |||
223 | (u_long) proc, (u_long) context); | 223 | (u_long) proc, (u_long) context); |
224 | } | 224 | } |
225 | 225 | ||
226 | /* Remove all cleanups, to be called after fork() */ | ||
227 | void | ||
228 | fatal_remove_all_cleanups(void) | ||
229 | { | ||
230 | struct fatal_cleanup *cu, *next_cu; | ||
231 | |||
232 | for (cu = fatal_cleanups; cu; cu = next_cu) { | ||
233 | next_cu = cu->next; | ||
234 | xfree(cu); | ||
235 | } | ||
236 | } | ||
237 | |||
226 | /* Cleanup and exit */ | 238 | /* Cleanup and exit */ |
227 | void | 239 | void |
228 | fatal_cleanup(void) | 240 | fatal_cleanup(void) |