Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!ncrlnk!ncr-sd!hp-sdd!apollo!megan!faulkner From: faulkner@megan.Apollo.COM (Donald Vaughn Faulkner) Newsgroups: comp.unix.wizards Subject: Re: Trapping SIGTSTP and then suspeding Message-ID: Date: 9 Oct 89 16:49:00 GMT References: Sender: faulkner@apollo.HP.COM Distribution: comp Organization: cust_serv Lines: 15 In-reply-to: t45126@iemisi.dhc's message of 6 Oct 89 12:44 GMT 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. If anyone could give me > some pointers i would appreciate it. By the way i'm using SunOS 4.0.3. the value returned by signal is probably "0" --- default handler, y'know... You can use "kill (getpid (), SIGSTOP)" to suspend yourself. -- Don Faulkner Customer Service OS Products Apollo Computer faulkner@apollo.hp.com