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 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);