diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2002-07-19 15:43:34 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2002-07-19 15:43:34 +0000 |
commit | b8aacf8f0b3ab392828d37a1367bf6f81d30c210 (patch) | |
tree | c96d1284dcc0019a5e18deba0b6a709e83023684 /usr.bin/ssh/session.c | |
parent | ed66f77079bc5bb211e47ca10c75bcb842f05d30 (diff) |
remove fatal cleanups after fork; based on discussions with and code
from solar.
Diffstat (limited to 'usr.bin/ssh/session.c')
-rw-r--r-- | usr.bin/ssh/session.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |