[Bug 52] ssh hangs on exit

bugzilla-daemon at mindrot.org
Sun, 21 Jan 2007 10:08:36 -0000

------- Comment #35 from djm at mindrot.org  2007-01-21 21:08 -------
Created an attachment (id=1227)
 --> (http://bugzilla.mindrot.org/attachment.cgi?id=1227&action=view)
patch against current 20070121

This patch makes the changes I mentioned in the previous comment, and
turns on the immediate close behaviour for ttys only when protocol 2 is
in use (it was on for ttys only for protocol 1 already).

Testcases for checking tty vs. non-tty behaviour:

1. ssh -1tt host "echo go; (sleep 10; echo done) & exit"
2. ssh -2tt host "echo go; (sleep 10; echo done) & exit"

TTY case: should see "go" and an immediate exit

3. ssh -1 host "echo go; (sleep 10; echo done) & exit"
4. ssh -2 host "echo go; (sleep 10; echo done) & exit"

No TTY case: should see "go" and then "done" after a 10
second delay.