xref: /csrg-svn/usr.bin/window/wwsuspend.c (revision 42835)
118742Sedward /*
233514Sbostic  * Copyright (c) 1983 Regents of the University of California.
333514Sbostic  * All rights reserved.
433514Sbostic  *
5*42835Sbostic  * %sccs.include.redist.c%
618742Sedward  */
718742Sedward 
833514Sbostic #ifndef lint
9*42835Sbostic static char sccsid[] = "@(#)wwsuspend.c	3.12 (Berkeley) 06/02/90";
1033514Sbostic #endif /* not lint */
1133514Sbostic 
1213960Sedward #include "ww.h"
1314649Sedward #include "tt.h"
1416398Sedward #include <sys/signal.h>
1513960Sedward 
1613960Sedward wwsuspend()
1713960Sedward {
1839255Sbostic 	sig_t oldsig;
1913960Sedward 
2015365Sedward 	oldsig = signal(SIGTSTP, SIG_IGN);
2113960Sedward 	wwend();
2215365Sedward 	(void) signal(SIGTSTP, SIG_DFL);
2314412Sedward 	(void) kill(0, SIGTSTP);
2415365Sedward 	(void) signal(SIGTSTP, SIG_IGN);
2517409Sedward 	(void) wwsettty(0, &wwnewtty, &wwoldtty);
2638563Sedward 	xxstart();
2738563Sedward 	wwredraw();		/* XXX, clears the screen twice */
2815365Sedward 	(void) signal(SIGTSTP, oldsig);
2913960Sedward }
30