xref: /csrg-svn/usr.bin/window/wwsuspend.c (revision 45033)
118742Sedward /*
233514Sbostic  * Copyright (c) 1983 Regents of the University of California.
333514Sbostic  * All rights reserved.
433514Sbostic  *
542954Sbostic  * This code is derived from software contributed to Berkeley by
642954Sbostic  * Edward Wang at The University of California, Berkeley.
742954Sbostic  *
842835Sbostic  * %sccs.include.redist.c%
918742Sedward  */
1018742Sedward 
1133514Sbostic #ifndef lint
12*45033Sedward static char sccsid[] = "@(#)wwsuspend.c	3.14 (Berkeley) 08/12/90";
1333514Sbostic #endif /* not lint */
1433514Sbostic 
1513960Sedward #include "ww.h"
1614649Sedward #include "tt.h"
1716398Sedward #include <sys/signal.h>
1813960Sedward 
1913960Sedward wwsuspend()
2013960Sedward {
2139255Sbostic 	sig_t oldsig;
2213960Sedward 
2315365Sedward 	oldsig = signal(SIGTSTP, SIG_IGN);
2413960Sedward 	wwend();
2515365Sedward 	(void) signal(SIGTSTP, SIG_DFL);
2614412Sedward 	(void) kill(0, SIGTSTP);
2715365Sedward 	(void) signal(SIGTSTP, SIG_IGN);
28*45033Sedward 	(void) wwsettty(0, &wwnewtty);
2938563Sedward 	xxstart();
3038563Sedward 	wwredraw();		/* XXX, clears the screen twice */
3115365Sedward 	(void) signal(SIGTSTP, oldsig);
3213960Sedward }
33