Fix hang on exit: needs to restore SIGIO reaction _before_

tcsetattr, because tcsetattr cause SIGIO in wakeup
This commit is contained in:
ache 1994-10-30 01:43:09 +00:00
parent 2a18c89772
commit efe303f9ea
2 changed files with 3 additions and 1 deletions

View File

@ -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)

View File

@ -322,8 +322,8 @@ wwinit()
* 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;
}