Bug 1985

Summary: -N and -O stop
Product: Portable OpenSSH Reporter: Salvador Fandiño <sfandino>
Component: sshAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: minor CC: djm, dtucker
Priority: P2    
Version: 5.9p1   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 2035    
Attachments:
Description Flags
tell mux master to close when using -N and all clients gone djm: ok+

Description Salvador Fandiño 2012-02-23 03:30:34 AEDT
When ssh is run in master mode and with the -N flag, it should terminate after receiving the "stop" control once all the slaves (and port forwarders?) are done.
Comment 1 Damien Miller 2012-03-09 10:06:27 AEDT
Yes, this sounds like a bug
Comment 2 Damien Miller 2012-09-07 11:38:25 AEST
Retarget uncompleted bugs from 6.1 => 6.2
Comment 3 Damien Miller 2012-09-07 11:40:47 AEST
Retarget bugs from 6.1 => 6.2
Comment 4 Darren Tucker 2012-09-07 15:14:44 AEST
Created attachment 2187 [details]
tell mux master to close when using -N and all clients gone

ok, so the problem here is that ssh assumes there's still a session in this case, then eventually runs a select(2) that never returns.

the attached patch should fix this, please try it.
Comment 5 Darren Tucker 2012-09-07 16:34:56 AEST
committed, thanks it will be in the 6.2 release.
Comment 6 Damien Miller 2013-03-22 12:02:15 AEDT
mark bugs closed by openssh-6.2 release as CLOSED