summaryrefslogtreecommitdiff
path: root/session.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 /session.c
parent6f52b3e39958dde417eacd9ca8fb513a3ea5b769 (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 'session.c')
-rw-r--r--session.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/session.c b/session.c
index 3c759e47..38388d43 100644
--- a/session.c
+++ b/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"
@@ -470,6 +470,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);
@@ -585,6 +587,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);