DTR program

1.4142135623730950488016887242096 root at ms.uky.edu
Mon May 13 01:43:25 AEST 1991


L-D'Ambrosio at dmr.asa.com (Louis D'Ambrosio) writes:

>    I've gotten involved in a project that requires a "C"
>program that can watch a given serial port and wait for DTR
>to go HI. The program would then run a script and continue
>watching the port for a drop of DTR.   If this occurs it would
>kill the script.    

DTR is driven by the computer (the [D]ata [T]erminal) and goes high
when the serial port is opened.  The device attached to the port drives
DCD and/or DSR (depends on the device) to signal that it is ready to
exchange data.  If you are looking for somebody to dial into a modem
or something similar, you probably want one of these signals.

If you are really monitoring for a process on your machine to open the
serial port, there is probably an easier way to do it than to fudge
the hardware directly.
-- 
Kenneth Herron                                            kherron at ms.uky.edu
University of Kentucky                                        (606) 257-2975
Department of Mathematics 
             "P.S.:  Please excuse the lateness of my reply." -- Ringo Starr



More information about the Comp.unix.questions mailing list