diff options
author | 2002-07-19 15:43:33 +0000 | |
---|---|---|
committer | 2002-07-19 15:43:33 +0000 | |
commit | ba9b5a473073702499259e1716065d389249a2f5 (patch) | |
tree | bbc3fcfb2e10936e121e7fe0a538fc851c22e20a /usr.bin/ssh/log.c | |
parent | constify, have missing prototypes, use pedantic compilation options. (diff) | |
download | wireguard-openbsd-ba9b5a473073702499259e1716065d389249a2f5.tar.xz wireguard-openbsd-ba9b5a473073702499259e1716065d389249a2f5.zip |
remove fatal cleanups after fork; based on discussions with and code
from solar.
Diffstat (limited to 'usr.bin/ssh/log.c')
-rw-r--r-- | usr.bin/ssh/log.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.bin/ssh/log.c b/usr.bin/ssh/log.c index 8dfc6882a26..7ed802c120c 100644 --- a/usr.bin/ssh/log.c +++ b/usr.bin/ssh/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" @@ -220,6 +220,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) |