xref: /csrg-svn/usr.bin/window/wwsuspend.c (revision 55911)
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*55911Sedward static char sccsid[] = "@(#)wwsuspend.c	3.16 (Berkeley) 08/16/92";
1333514Sbostic #endif /* not lint */
1433514Sbostic 
1513960Sedward #include "ww.h"
1614649Sedward #include "tt.h"
1716398Sedward #include <sys/signal.h>
1813960Sedward 
1945034Sedward void
2013960Sedward wwsuspend()
2113960Sedward {
2239255Sbostic 	sig_t oldsig;
2313960Sedward 
2415365Sedward 	oldsig = signal(SIGTSTP, SIG_IGN);
25*55911Sedward 	wwend(0);
2615365Sedward 	(void) signal(SIGTSTP, SIG_DFL);
2714412Sedward 	(void) kill(0, SIGTSTP);
2815365Sedward 	(void) signal(SIGTSTP, SIG_IGN);
2945033Sedward 	(void) wwsettty(0, &wwnewtty);
3038563Sedward 	xxstart();
3138563Sedward 	wwredraw();		/* XXX, clears the screen twice */
3215365Sedward 	(void) signal(SIGTSTP, oldsig);
3313960Sedward }
34