xref: /csrg-svn/usr.bin/window/wwsuspend.c (revision 18742)
113960Sedward #ifndef lint
2*18742Sedward static char sccsid[] = "@(#)wwsuspend.c	3.7 04/24/85";
313960Sedward #endif
413960Sedward 
5*18742Sedward /*
6*18742Sedward  * Copyright (c) 1983 Regents of the University of California,
7*18742Sedward  * All rights reserved.  Redistribution permitted subject to
8*18742Sedward  * the terms of the Berkeley Software License Agreement.
9*18742Sedward  */
10*18742Sedward 
1113960Sedward #include "ww.h"
1214649Sedward #include "tt.h"
1316398Sedward #include <sys/signal.h>
1413960Sedward 
1513960Sedward wwsuspend()
1613960Sedward {
1715365Sedward 	int (*oldsig)();
1813960Sedward 
1915365Sedward 	oldsig = signal(SIGTSTP, SIG_IGN);
2013960Sedward 	wwend();
2115365Sedward 	(void) signal(SIGTSTP, SIG_DFL);
2214412Sedward 	(void) kill(0, SIGTSTP);
2315365Sedward 	(void) signal(SIGTSTP, SIG_IGN);
2417409Sedward 	(void) wwsettty(0, &wwnewtty, &wwoldtty);
2514649Sedward 	(*tt.tt_init)();
2614412Sedward 	wwredraw();
2715365Sedward 	(void) signal(SIGTSTP, oldsig);
2813960Sedward }
29