Commit | Line | Data |
---|---|---|
bd2eadcc KA |
1 | # include <signal.h> |
2 | ||
bd2eadcc KA |
3 | # include "curses.ext" |
4 | ||
5 | /* | |
6 | * handle stop and start signals | |
7 | * | |
166537b0 | 8 | * %G% (Berkeley) @(#)tstp.c 1.2 |
bd2eadcc KA |
9 | */ |
10 | tstp() { | |
11 | ||
166537b0 KA |
12 | # ifdef SIGTSTP |
13 | ||
bd2eadcc KA |
14 | SGTTY tty; |
15 | # ifdef DEBUG | |
16 | if (outf) | |
17 | fflush(outf); | |
18 | # endif | |
19 | tty = _tty; | |
20 | mvcur(0, COLS - 1, LINES - 1, 0); | |
21 | endwin(); | |
22 | fflush(stdout); | |
23 | kill(0, SIGTSTP); | |
24 | signal(SIGTSTP, tstp); | |
25 | _tty = tty; | |
26 | stty(_tty_ch, &_tty); | |
27 | wrefresh(curscr); | |
166537b0 | 28 | # endif SIGTSTP |
bd2eadcc | 29 | } |