Bug 1948 - ssh -f doesn't terminate when muxing connections.
Summary: ssh -f doesn't terminate when muxing connections.
Status: REOPENED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.9p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 11:08 AEDT by Peter Chubb
Modified: 2015-06-05 14:39 AEST (History)
1 user (show)

See Also:


Attachments
Obey -f even when a muxclient. (765 bytes, patch)
2011-11-01 11:08 AEDT, Peter Chubb
dtucker: ok+
Details | Diff
daemonise with when -f specified and not in ControlPersist mode (677 bytes, patch)
2015-06-05 14:39 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Chubb 2011-11-01 11:08:57 AEDT
Created attachment 2101 [details]
Obey -f even when a muxclient.

To repeat:

Set up to use a master connection to some host.  I have

Host *
      ControlMaster auto
      ControlPath /tmp/%r@%h:%p

in ~/.ssh/config

Then do:

ssh -f -X somehost xterm
ssh -f -X somehost xterm


The first invocation establishes a connexion, and starts a terminal, then exits.  The second acts as a mux client, starts a terminal, and does not exit,

I've attached a patch to fix the problem.
Comment 1 Damien Miller 2011-12-02 11:06:20 AEDT
Comment on attachment 2101 [details]
Obey -f even when a muxclient.

I think this looks okay. Darren?
Comment 2 Damien Miller 2011-12-02 11:42:20 AEDT
Patch applied - this will be in the OpenSSH-6.0 release. Thanks!
Comment 3 Damien Miller 2011-12-05 10:17:53 AEDT
Diff was reverted due to bad interaction with ControlPersist. The daemon() is triggering in the user-facing process causing tty insanity.
Comment 4 Damien Miller 2012-02-24 10:34:28 AEDT
Retarget from 6.0 to 6.1
Comment 5 Damien Miller 2012-02-24 10:38:07 AEDT
Retarget 6.0 => 6.1
Comment 6 Damien Miller 2012-09-07 11:38:17 AEST
Retarget uncompleted bugs from 6.1 => 6.2
Comment 7 Damien Miller 2012-09-07 11:40:42 AEST
Retarget bugs from 6.1 => 6.2
Comment 8 Damien Miller 2013-03-08 10:24:04 AEDT
retarget to openssh-6.3
Comment 9 Damien Miller 2013-07-25 12:18:00 AEST
Retarget to openssh-6.4
Comment 10 Damien Miller 2013-07-25 12:20:58 AEST
Retarget 6.3 -> 6.4
Comment 11 Damien Miller 2014-02-06 10:18:09 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 12 Damien Miller 2014-02-06 10:20:17 AEDT
Retarget incomplete bugs / feature requests to 6.6 release
Comment 13 Damien Miller 2014-04-12 14:49:43 AEST
Retarget to 6.7 release, since 6.6 was mostly bugfixing.
Comment 14 Damien Miller 2014-04-12 14:54:09 AEST
Remove from 6.6 tracking bug
Comment 15 Damien Miller 2014-08-30 04:38:22 AEST
Retarget incomplete bugs to 6.8 release.
Comment 16 Damien Miller 2014-08-30 04:39:57 AEST
These bugs are no longer targeted at the imminent 6.7 release
Comment 17 Damien Miller 2015-03-03 07:59:31 AEDT
OpenSSH 6.8 is approaching release and closed for major work. Retarget these bugs for the next release.
Comment 18 Damien Miller 2015-03-03 08:01:35 AEDT
Retarget to 6.9
Comment 19 Damien Miller 2015-06-05 14:39:25 AEST
Created attachment 2645 [details]
daemonise with when -f specified and not in ControlPersist mode

Maybe something as simple as this?
Comment 20 Damien Miller 2015-06-05 14:39:46 AEST
detarget for 6.9, this needs more testing