118742Sedward /* 233514Sbostic * Copyright (c) 1983 Regents of the University of California. 333514Sbostic * All rights reserved. 433514Sbostic * 533514Sbostic * Redistribution and use in source and binary forms are permitted 6*34909Sbostic * provided that the above copyright notice and this paragraph are 7*34909Sbostic * duplicated in all such forms and that any documentation, 8*34909Sbostic * advertising materials, and other materials related to such 9*34909Sbostic * distribution and use acknowledge that the software was developed 10*34909Sbostic * by the University of California, Berkeley. The name of the 11*34909Sbostic * University may not be used to endorse or promote products derived 12*34909Sbostic * from this software without specific prior written permission. 13*34909Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*34909Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*34909Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1618742Sedward */ 1718742Sedward 1833514Sbostic #ifndef lint 19*34909Sbostic static char sccsid[] = "@(#)wwsuspend.c 3.9 (Berkeley) 06/29/88"; 2033514Sbostic #endif /* not lint */ 2133514Sbostic 2213960Sedward #include "ww.h" 2314649Sedward #include "tt.h" 2416398Sedward #include <sys/signal.h> 2513960Sedward 2613960Sedward wwsuspend() 2713960Sedward { 2815365Sedward int (*oldsig)(); 2913960Sedward 3015365Sedward oldsig = signal(SIGTSTP, SIG_IGN); 3113960Sedward wwend(); 3215365Sedward (void) signal(SIGTSTP, SIG_DFL); 3314412Sedward (void) kill(0, SIGTSTP); 3415365Sedward (void) signal(SIGTSTP, SIG_IGN); 3517409Sedward (void) wwsettty(0, &wwnewtty, &wwoldtty); 3614649Sedward (*tt.tt_init)(); 3714412Sedward wwredraw(); 3815365Sedward (void) signal(SIGTSTP, oldsig); 3913960Sedward } 40