Fix hang on exit: needs to restore SIGIO reaction _before_
tcsetattr, because tcsetattr cause SIGIO in wakeup
This commit is contained in:
parent
2a18c89772
commit
efe303f9ea
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user