xref: /original-bsd/usr.bin/window/wwsuspend.c (revision 71eaf591)
1 /*
2  * Copyright (c) 1983, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * This code is derived from software contributed to Berkeley by
6  * Edward Wang at The University of California, Berkeley.
7  *
8  * %sccs.include.redist.c%
9  */
10 
11 #ifndef lint
12 static char sccsid[] = "@(#)wwsuspend.c	8.1 (Berkeley) 06/06/93";
13 #endif /* not lint */
14 
15 #include "ww.h"
16 #include "tt.h"
17 #include <sys/signal.h>
18 
19 wwsuspend()
20 {
21 	sig_t oldsig;
22 
23 	oldsig = signal(SIGTSTP, SIG_IGN);
24 	wwend(0);
25 	(void) signal(SIGTSTP, SIG_DFL);
26 	(void) kill(0, SIGTSTP);
27 	(void) signal(SIGTSTP, SIG_IGN);
28 	wwstart();
29 	(void) signal(SIGTSTP, oldsig);
30 }
31