aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2002-12-04 16:38:53 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2002-12-04 16:38:53 +0000
commitfcc7d09085694bcbfb419a3dca33b14bbf8fff5f (patch)
tree8fb2d8824388af70416c72142ad488a33e97e51a /terms.c
parentfix indent (diff)
downloadw3m-fcc7d09085694bcbfb419a3dca33b14bbf8fff5f.tar.gz
w3m-fcc7d09085694bcbfb419a3dca33b14bbf8fff5f.zip
[w3m-dev-en 00841] Re: w3m segfaults if the terminal is not writable
* terms.c (reset_tty): don't close stderr From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'terms.c')
-rw-r--r--terms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/terms.c b/terms.c
index 6f43baf..10cd44a 100644
--- a/terms.c
+++ b/terms.c
@@ -1,4 +1,4 @@
-/* $Id: terms.c,v 1.39 2002/11/19 17:18:54 ukai Exp $ */
+/* $Id: terms.c,v 1.40 2002/12/04 16:38:54 ukai Exp $ */
/*
* An original curses library for EUC-kanji by Akinori ITO, December 1989
* revised by Akinori ITO, January 1995
@@ -584,7 +584,8 @@ reset_tty(void)
writestr(T_se); /* reset terminal */
fflush(ttyf);
TerminalSet(tty, &d_ioval);
- close(tty);
+ if (tty != 2)
+ close(tty);
}
MySignalHandler