summaryrefslogtreecommitdiffstats
path: root/usr.bin/window
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-10-30 01:43:09 +0000
committerache <ache@FreeBSD.org>1994-10-30 01:43:09 +0000
commitce751ae1f74f64cb33e1731a249cadaeb020a2d1 (patch)
tree833ea2c68518a9283a5de1e1056a9f8917e97997 /usr.bin/window
parentb76a2ea093d25e67cdfcd4d5edde9acb89001f37 (diff)
downloadFreeBSD-src-ce751ae1f74f64cb33e1731a249cadaeb020a2d1.zip
FreeBSD-src-ce751ae1f74f64cb33e1731a249cadaeb020a2d1.tar.gz
Fix hang on exit: needs to restore SIGIO reaction _before_
tcsetattr, because tcsetattr cause SIGIO in wakeup
Diffstat (limited to 'usr.bin/window')
-rw-r--r--usr.bin/window/wwend.c2
-rw-r--r--usr.bin/window/wwinit.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/window/wwend.c b/usr.bin/window/wwend.c
index 9586f14..b984d2d 100644
--- a/usr.bin/window/wwend.c
+++ b/usr.bin/window/wwend.c
@@ -38,6 +38,7 @@
static char sccsid[] = "@(#)wwend.c 8.1 (Berkeley) 6/6/93";
#endif /* not lint */
+#include <signal.h>
#include "ww.h"
#include "tt.h"
@@ -49,6 +50,7 @@ wwend(exit)
wwdocheckpoint = 0;
}
xxend();
+ (void) signal(SIGIO, SIG_DFL);
(void) wwsettty(0, &wwoldtty);
#ifdef TERMINFO
if (exit)
diff --git a/usr.bin/window/wwinit.c b/usr.bin/window/wwinit.c
index 596f1a2..4e4d5da 100644
--- a/usr.bin/window/wwinit.c
+++ b/usr.bin/window/wwinit.c
@@ -322,8 +322,8 @@ bad:
* Don't bother to free storage. We're supposed
* to exit when wwinit fails anyway.
*/
- (void) wwsettty(0, &wwoldtty);
(void) signal(SIGIO, SIG_DFL);
+ (void) wwsettty(0, &wwoldtty);
(void) sigsetmask(s);
return -1;
}
OpenPOWER on IntegriCloud