Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: Trapping SIGTSTP and then suspeding Message-ID: <11238@smoke.BRL.MIL> Date: 7 Oct 89 00:47:12 GMT References: Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article t45126@iemisi.dhc (John Durko) writes: -Can someone help me with a problem. I am trying to trap signal 18 (SIGTSTP) -so that i can reset some terminal stuff before program is suspend by ^Z. The -question is how to i actually suspend the program. I have tried saving the -value returned from signal() and then calling it from my handler routine but -the program core dumps with a segmentation fault. Your signal handler should block the signal, act on it, reset the action to the original return from the signal() call that planted your handler, then send another occurrence of the signal to the process via kill().