From b8aacf8f0b3ab392828d37a1367bf6f81d30c210 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Fri, 19 Jul 2002 15:43:34 +0000 Subject: remove fatal cleanups after fork; based on discussions with and code from solar. --- usr.bin/ssh/session.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.bin/ssh/session.c') diff --git a/usr.bin/ssh/session.c b/usr.bin/ssh/session.c index 4128bda0b92..456a3b82c7a 100644 --- a/usr.bin/ssh/session.c +++ b/usr.bin/ssh/session.c @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.143 2002/06/30 21:54:16 deraadt Exp $"); +RCSID("$OpenBSD: session.c,v 1.144 2002/07/19 15:43:33 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -441,6 +441,8 @@ do_exec_no_pty(Session *s, const char *command) /* Fork the child. */ if ((pid = fork()) == 0) { + fatal_remove_all_cleanups(); + /* Child. Reinitialize the log since the pid has changed. */ log_init(__progname, options.log_level, options.log_facility, log_stderr); @@ -547,6 +549,7 @@ do_exec_pty(Session *s, const char *command) /* Fork the child. */ if ((pid = fork()) == 0) { + fatal_remove_all_cleanups(); /* Child. Reinitialize the log because the pid has changed. */ log_init(__progname, options.log_level, options.log_facility, log_stderr); -- cgit v1.2.3