Module Name: src
Committed By: blymn
Date: Mon Oct 9 21:14:29 UTC 2023
Modified Files:
src/lib/libcurses: tty.c
Log Message:
Correct the fd closed check so we actually check the outfd as per
the comment. Thanks for [email protected] for catching this one.
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/lib/libcurses/tty.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/tty.c
diff -u src/lib/libcurses/tty.c:1.49 src/lib/libcurses/tty.c:1.50
--- src/lib/libcurses/tty.c:1.49 Mon Sep 6 07:03:50 2021
+++ src/lib/libcurses/tty.c Mon Oct 9 21:14:29 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.49 2021/09/06 07:03:50 rin Exp $ */
+/* $NetBSD: tty.c,v 1.50 2023/10/09 21:14:29 blymn Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95";
#else
-__RCSID("$NetBSD: tty.c,v 1.49 2021/09/06 07:03:50 rin Exp $");
+__RCSID("$NetBSD: tty.c,v 1.50 2023/10/09 21:14:29 blymn Exp $");
#endif
#endif /* not lint */
@@ -113,7 +113,7 @@ _cursesi_gettmode(SCREEN *screen)
if (tcgetattr(fileno(screen->infd), &screen->orig_termios)) {
/* if the input fd is not a tty try the output */
- if (tcgetattr(fileno(screen->infd), &screen->orig_termios)) {
+ if (tcgetattr(fileno(screen->outfd), &screen->orig_termios)) {
/* not a tty ... we will disable tty related stuff */
screen->notty = TRUE;
__GT = 0;