On Monday 31 January 2005 00:01, guy keren wrote: > > On Sun, 30 Jan 2005, David Harel wrote: > > signal(SIGALRM, sigalrmHandler); > > a-ha! and since when do you use 'signal' in a portable program, that's > supposed to have a persistent signal handler? > > read 'man 2 signal', and look at the portability notes. > > then read 'man 2 sigaction', and use sigaction() instead of signal(). > > > while(1) > > pause();
Just to complete the correct answer by guy, pause should be replaced with sigsuspend (Hmmm... how nice, on Linux it is in the same man page as sigaction so you probably know it by now). Further reading: the "Reliable signal handling" in the late Richard Stevens book (Advanced Programming in the Unix Environment). -- Oron Peled Voice/Fax: +972-4-8228492 [EMAIL PROTECTED] http://www.actcom.co.il/~oron ICQ UIN: 16527398 .--. |o_o | |:_/ | // \ \ (| | ) /'\_ _/`\ \___)=(___/ ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]