summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2013-07-25 00:29:10 +0000
committerdjm <djm@openbsd.org>2013-07-25 00:29:10 +0000
commitf265110ef0141c1ae10ea81946bbaec55201575f (patch)
tree01e687e0bd074fad9c38c1260515c1fe06d0b205 /usr.bin/ssh/ssh.c
parentsync (diff)
downloadwireguard-openbsd-f265110ef0141c1ae10ea81946bbaec55201575f.tar.xz
wireguard-openbsd-f265110ef0141c1ae10ea81946bbaec55201575f.zip
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/ssh.c')
-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);
}