aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-09-23 15:08:21 +0000
committerTiago Cunha <tcunha@gmx.com>2009-09-23 15:08:21 +0000
commitfea7bda58f59b632325db35607c7b999e3974039 (patch)
tree6d073bc0d0cc565866a075bbc6208bd76d30654b /tty.c
parent88f689e16727859674f186a0fd28cbf92d9427d6 (diff)
downloadrtmux-fea7bda58f59b632325db35607c7b999e3974039.tar.gz
rtmux-fea7bda58f59b632325db35607c7b999e3974039.tar.bz2
rtmux-fea7bda58f59b632325db35607c7b999e3974039.zip
Sync OpenBSD patchset 348:
Don't die if the client is detaching (the tty has been closed) after waking up from locking.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tty.c b/tty.c
index 14650593..1b0c3b7e 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.136 2009-09-23 15:00:09 tcunha Exp $ */
+/* $Id: tty.c,v 1.137 2009-09-23 15:08:21 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -133,6 +133,9 @@ tty_start_tty(struct tty *tty)
int what;
#endif
+ if (tty->fd == -1)
+ return;
+
#if 0
tty_detect_utf8(tty);
#endif