projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3f21a82
)
fix for new signals
author
Sam Leffler
<sam@ucbvax.Berkeley.EDU>
Sun, 26 Jun 1983 13:34:26 +0000
(
05:34
-0800)
committer
Sam Leffler
<sam@ucbvax.Berkeley.EDU>
Sun, 26 Jun 1983 13:34:26 +0000
(
05:34
-0800)
SCCS-vsn: lib/libcurses/tstp.c 1.3
usr/src/lib/libcurses/tstp.c
patch
|
blob
|
blame
|
history
diff --git
a/usr/src/lib/libcurses/tstp.c
b/usr/src/lib/libcurses/tstp.c
index
ce066ee
..
b71a61f
100644
(file)
--- a/
usr/src/lib/libcurses/tstp.c
+++ b/
usr/src/lib/libcurses/tstp.c
@@
-12,6
+12,7
@@
tstp() {
# ifdef SIGTSTP
SGTTY tty;
+ int omask;
# ifdef DEBUG
if (outf)
fflush(outf);
@@
-20,7
+21,12
@@
tstp() {
mvcur(0, COLS - 1, LINES - 1, 0);
endwin();
fflush(stdout);
+ /* reset signal handler so kill below stops us */
+ signal(SIGTSTP, SIG_DFL);
+#define mask(s) (1 << ((s)-1))
+ omask = sigsetmask(sigblock(0) &~ mask(SIGTSTP));
kill(0, SIGTSTP);
+ sigblock(mask(SIGTSTP));
signal(SIGTSTP, tstp);
_tty = tty;
stty(_tty_ch, &_tty);