summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
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 3c759e472..38388d43a 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.143 2002/06/30 21:54:16 deraadt Exp $"); 36RCSID("$OpenBSD: session.c,v 1.144 2002/07/19 15:43:33 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -470,6 +470,8 @@ do_exec_no_pty(Session *s, const char *command)
470 470
471 /* Fork the child. */ 471 /* Fork the child. */
472 if ((pid = fork()) == 0) { 472 if ((pid = fork()) == 0) {
473 fatal_remove_all_cleanups();
474
473 /* Child. Reinitialize the log since the pid has changed. */ 475 /* Child. Reinitialize the log since the pid has changed. */
474 log_init(__progname, options.log_level, options.log_facility, log_stderr); 476 log_init(__progname, options.log_level, options.log_facility, log_stderr);
475 477
@@ -585,6 +587,7 @@ do_exec_pty(Session *s, const char *command)
585 587
586 /* Fork the child. */ 588 /* Fork the child. */
587 if ((pid = fork()) == 0) { 589 if ((pid = fork()) == 0) {
590 fatal_remove_all_cleanups();
588 591
589 /* Child. Reinitialize the log because the pid has changed. */ 592 /* Child. Reinitialize the log because the pid has changed. */
590 log_init(__progname, options.log_level, options.log_facility, log_stderr); 593 log_init(__progname, options.log_level, options.log_facility, log_stderr);