diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2010-04-23 22:27:39 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2010-04-23 22:27:39 +0000 |
commit | a85cd368f229024d9bdb7499e5dff6f978f44c2a (patch) | |
tree | a587ae226e5ccbc08c240be736186724b382f678 | |
parent | 7a7321850cd87db045bd14cd561529b0cdb1dfc2 (diff) |
set "detach_close" flag when registering channel cleanup callbacks.
This causes the channel to close normally when its fds close and
hangs when terminating a mux slave using ~. bz#1758; ok markus@
-rw-r--r-- | usr.bin/ssh/mux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/mux.c b/usr.bin/ssh/mux.c index 0e19aed218f..e8d14c406ae 100644 --- a/usr.bin/ssh/mux.c +++ b/usr.bin/ssh/mux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mux.c,v 1.15 2010/04/10 05:48:16 djm Exp $ */ +/* $OpenBSD: mux.c,v 1.16 2010/04/23 22:27:38 djm Exp $ */ /* * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> * @@ -437,7 +437,7 @@ process_mux_new_session(u_int rid, Channel *c, Buffer *m, Buffer *r) channel_send_open(nc->self); channel_register_open_confirm(nc->self, mux_session_confirm, cctx); - channel_register_cleanup(nc->self, mux_master_session_cleanup_cb, 0); + channel_register_cleanup(nc->self, mux_master_session_cleanup_cb, 1); /* prepare reply */ /* XXX defer until mux_session_confirm() fires */ @@ -809,7 +809,7 @@ process_mux_stdio_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r) debug2("%s: channel_new: %d linked to control channel %d", __func__, nc->self, nc->ctl_chan); - channel_register_cleanup(nc->self, mux_master_session_cleanup_cb, 0); + channel_register_cleanup(nc->self, mux_master_session_cleanup_cb, 1); /* prepare reply */ /* XXX defer until channel confirmed */ |