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 634909Sbostic * provided that the above copyright notice and this paragraph are 734909Sbostic * duplicated in all such forms and that any documentation, 834909Sbostic * advertising materials, and other materials related to such 934909Sbostic * distribution and use acknowledge that the software was developed 1034909Sbostic * by the University of California, Berkeley. The name of the 1134909Sbostic * University may not be used to endorse or promote products derived 1234909Sbostic * from this software without specific prior written permission. 1334909Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1434909Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1534909Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1618742Sedward */ 1718742Sedward 1833514Sbostic #ifndef lint 19*39255Sbostic static char sccsid[] = "@(#)wwsuspend.c 3.11 (Berkeley) 10/03/89"; 2033514Sbostic #endif /* not lint */ 2133514Sbostic 2213960Sedward #include "ww.h" 2314649Sedward #include "tt.h" 2416398Sedward #include <sys/signal.h> 2513960Sedward 2613960Sedward wwsuspend() 2713960Sedward { 28*39255Sbostic sig_t 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); 3638563Sedward xxstart(); 3738563Sedward wwredraw(); /* XXX, clears the screen twice */ 3815365Sedward (void) signal(SIGTSTP, oldsig); 3913960Sedward } 40