summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-07-25 00:29:11 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-07-25 00:29:11 +0000
commitbe40168718f1bceac12e860898bb5f9ece1a31b9 (patch)
tree61f59654695afec8c9043c01dd2f33f7c912271d /usr.bin/ssh
parent66114733f75f63cfe0bd1b937120ea77d695a136 (diff)
daemonise backgrounded (ControlPersist'ed) multiplexing master to ensure
it is fully detached from its controlling terminal. based on debugging and patch from tedu@ ok dtucker@ "be careful" deraadt@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/ssh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 4ca2240c87a..e9c86a1b272 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.380 2013/07/20 01:44:37 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.381 2013/07/25 00:29:10 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -971,6 +971,7 @@ control_persist_detach(void)
if (devnull > STDERR_FILENO)
close(devnull);
}
+ daemon(1, 1);
setproctitle("%s [mux]", options.control_path);
}