summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/ssh.c b/ssh.c
index a1cf01513..e6073af7b 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.341 2010/06/26 23:04:04 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.342 2010/07/12 22:38:52 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1301,8 +1301,13 @@ ssh_session2(void)
1301 /* Start listening for multiplex clients */ 1301 /* Start listening for multiplex clients */
1302 muxserver_listen(); 1302 muxserver_listen();
1303 1303
1304 /* If requested, let ssh continue in the background. */ 1304 /*
1305 if (fork_after_authentication_flag) { 1305 * If requested and we are not interested in replies to remote
1306 * forwarding requests, then let ssh continue in the background.
1307 */
1308 if (fork_after_authentication_flag &&
1309 (!options.exit_on_forward_failure ||
1310 options.num_remote_forwards == 0)) {
1306 fork_after_authentication_flag = 0; 1311 fork_after_authentication_flag = 0;
1307 if (daemon(1, 1) < 0) 1312 if (daemon(1, 1) < 0)
1308 fatal("daemon() failed: %.200s", strerror(errno)); 1313 fatal("daemon() failed: %.200s", strerror(errno));