SIGPHONE on UNIXPC not working
Todd Day
todd at ivucsb.UUCP
Wed Feb 15 03:46:58 AEST 1989
I am having a problem getting a program to catch the SIGPHONE signal.
Here is a short bit of my program:
extern int wakeup();
main()
{
signal(SIGPHONE, wakeup); /* catch SIGPHONE (SIG_IGN by default)*/
printf("before pause\n");
pause(); /* take a siesta until phone rings */
signal(SIGPHONE, SIG_IGN); /* ignore anymore phone changes */
}
/* wakeup is a dummy so we can catch phone changes
*/
int wakeup()
{
printf("SIGPHONE\n");
}
The output of this program simply produces:
before pause
and then it hangs. That's fine, but when the phone rings, or when I toggle
the status of the line, my program still hangs without further output. It
appears that my program never gets SIGPHONE. However, the phone manager
says VOICE 1:<RING, so it appears that the signal is getting to ph.
Anyone know what I'm doing wrong? Do I have to have a ppid of 1 like ph?
How do I get ppid of 1?
Todd Day | ..!pyramid!nessus!ivucsb!todd | todd at ivucsb.UUCP
^^^^^^ new! ^^^^^^^^^^^ maybe?
More information about the Unix-pc.general
mailing list