2 * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
7 /* All Rights Reserved */
10 * Copyright (c) 1980 Regents of the University of California.
11 * All rights reserved. The Berkeley software License Agreement
12 * specifies the terms and conditions for redistribution.
15 #pragma ident "%Z%%M% %I% %E% SMI"
19 sccsid
[] = "@(#)tstp.c 1.6 88/02/08 SMI"; /* from UCB 5.1 85/06/07 */
22 #include <sys/types.h>
28 * handle stop and start signals
30 * @(#)tstp.c 5.1 (Berkeley) 6/7/85
44 (void) mvcur(0, COLS
- 1, LINES
- 1, 0);
46 (void) fflush(stdout
);
47 /* reset signal handler so kill below stops us */
48 (void) signal(SIGTSTP
, SIG_DFL
);
49 (void) sigsetmask(sigblock(0) &~ sigmask(SIGTSTP
));
50 (void) kill(0, SIGTSTP
);
51 (void) sigblock(sigmask(SIGTSTP
));
52 (void) signal(SIGTSTP
, (void(*)(int))tstp
);
54 (void) stty(_tty_ch
, &_tty
);
55 (void) wrefresh(curscr
);