tty screwed up on ctrl-c

jw schultz jw at
Wed Dec 17 11:03:53 EST 2003

On Tue, Dec 16, 2003 at 03:33:29PM -0800, Wayne Davison wrote:
> On Tue, Dec 16, 2003 at 10:45:12PM +0100, Paul Slootman wrote:
> > I've noticed (at least when using -e ssh) that if ssh prompts for a
> > password or such, and you hit ctrl-c, you're more often than not left
> > with a tty with screwed up settings.
> Thanks for re-mentioning this patch.  It does have the advantage of
> being a very simple change, and thus having little chance of causing
> problems.  However, it is a kluge rather than a fix, so there's no
> actual guarantee that ssh will really have time to do its cleanup in
> all circumstances, it simply becomes more likely.
> I'd be in favor of allowing this for the 2.6.0 release, though, and
> then trying to implement a better fix in the future.

I remember this as well and the root of the problem was not
that rsync didn't wait long enough but that ssh was not
resetting the tty for all catchable signals including
SIGUSR1 which is what we send to kill_all children.

The change is simple enough and safe enough though i don't
much like the idea of a half second delay that still won't
always be long enough.  I still consider it a non-issue, and
yes i have hit it but i've had similar things happen in the
past with other utilities and a simple "tty sane" typed
blind does the trick.

Paul, have you pinged the openssh developers on this?

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at

		Remember Cernan and Schmitt

More information about the rsync mailing list