commit c8dda29157ef03b4e8466f832f142a585f9b1550
parent 3afe698f65571dba4979132c7bd4b9aa49999673
Author: ukai <ukai>
Date: Wed, 4 Dec 2002 16:38:53 +0000
[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:
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-05 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
+
+ * [w3m-dev-en 00841] Re: w3m segfaults if the terminal is not writable
+ * terms.c (reset_tty): don't close stderr
+
2002-12-04 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03516] Re: 2 stroke keybinding
diff --git a/terms.c b/terms.c
@@ -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