Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!anise!ivucsb!todd From: todd@ivucsb.sba.ca.us (Todd Day) Newsgroups: comp.sys.att Subject: Re: Checking the phone/Screen Message-ID: <1989Jun24.194215.2260@ivucsb.sba.ca.us> Date: 24 Jun 89 19:42:15 GMT References: <25203@shemp.CS.UCLA.EDU> Reply-To: todd@ivucsb.sba.ca.us (Todd Day) Organization: Disillusioned Graduate Hackers, Santa Barbara, CA Lines: 31 In article <25203@shemp.CS.UCLA.EDU> michael@CS.UCLA.EDU (michael gersten) writes: ~I want the Unix-PC to beep whenever line one rings (for example, ~if I'm using line 2). If I can read the contents of /dev/w2 (the ~phone manager's window), this would be easy; just read it and look ~for "RING". ~ ~Alternativly, if I could find out when the phone is ringing, without ~interfearing with the current phone manager, then I could do it. What I had to do was actually modify the kernel (3.50) temporarily so that I could gain control of SIGPHONE. It seems that SIGPHONE only gets sent to the process that opens the phone device first. Since phone manager is the first to do this, no other process can get ahold of it. Basically, my patch to the kernel simply NOPS the code that checks to see if the phone device is already open. Then, the address of my process is set up for the signal. This removes the signal going to the phone manager, however, so every time I get the signal, I do a kill(-1, SIGPHONE) so SIGPHONE gets sent to everyone! However, since the default for SIGPHONE is SIGIGN, you don't have to worry. Why did I have to do the modification in the first place? Why doesn't the kernal send SIGPHONE to all processes that want it? Anyone? Someday when I finish unpacking all my stuff, I'll bind up my ringdaemon and send it to the net. -- Todd Day | todd@ivucsb.sba.ca.us | ivucsb!todd@anise.acc.com "All theory, no practice. That's the story of my life."