Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!apple.com!jms From: jms@apple.com (John Michael Sovereign) Newsgroups: comp.unix.aux Subject: Re: How can a program (daemon) detect loss of carrier detect? Message-ID: <13387@goofy.Apple.COM> Date: 7 May 91 21:10:04 GMT References: <1991May4.180739.9652@wiskit.rain.com> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 20 In article <> herbw@wiskit.rain.com (Herb Weiner) writes: > My mac is connected to a Portland area SLIP network over dial-up phone > lines. Occasionally, the line gets dropped. What I'd like to do is > write a daemon that detects the loss of carrier detect, and automatically > redials the line and restarts SLIP. If modem control is enabled (stty modem) and CLOCAL is disabled in c_cflag in the termio structure, the process group will receive the SIGHUP signal when carrier detect is lost. If you arrange for your daemon and slattconf to be in the same process group, your daemon can catch the SIGHUP and respawn slattconf. Of course, slattconf sets its pgrp to its pid so that the device will be its controlling terminal. Your daemon will need to do a setpgrp to the child pid returned by fork. John Sovereign jms@apple.com #include