summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-09-23 07:25:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-09-23 07:25:32 +0000
commit3c4316fd36273c63968f470148fcf4d5a1f5d0eb (patch)
treea289fe7d1b9d532a7f26ef60c78e5cfeff62e16d
parentc5c58d8fcaaa66d223a253ba004b44f0a7006dff (diff)
Don't die if the client is detaching (the tty has been closed) after waking up
from locking.
-rw-r--r--usr.bin/tmux/tty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 48e302de0cc..d6c49bb0e6a 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.32 2009/09/23 06:18:48 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.33 2009/09/23 07:25:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -131,6 +131,9 @@ tty_start_tty(struct tty *tty)
struct termios tio;
int what;
+ if (tty->fd == -1)
+ return;
+
#if 0
tty_detect_utf8(tty);
#endif