Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-beacon!eru!kth.se!sunic!cs.umu.se!dvldbg From: dvldbg@cs.umu.se (Daniel Brahneborg) Newsgroups: comp.unix.programmer Subject: Ignore Message-ID: <1991Mar25.011538.11226@cs.umu.se> Date: 25 Mar 91 01:15:38 GMT Sender: news@cs.umu.se (News Administrator) Distribution: comp.unix.programmer Organization: Dep. of Info.Proc, Umea Univ., Sweden Lines: 17 >I'm doing a menu in C, and trying to ignore etc. >In other words, I would like the program not to be interrupted until user >select 'Quit' from the menu. (If I press when the program is waiting >for user to select the menu, the program will go to infinite loop) There are as far as I know two ways of doing this. The easiest way is to use the signal(3) call, or maybe the underlying system call, and tell it to ignore SIGSUSP, SIGINTR, SIGTERM, and a few others. Or if you prefer, call one of your own routines. The other way is to manupulate the terminal handler, which sends the above mentioned signals. By calling ioctl(), you can set a lot of things, which I leave you to discover for yourself. Send a mail if it doesn't work, and I'll see what I can do to help you. /Basic