[comp.lang.c] Determining Carrier on Modem

jeffrey@rigel.econ.uga.edu (Jeffrey A. Thompson) (12/13/90)

I would like to know how to determine if a modem has or doesn't have a carrier.
The program has an open file descriptor (O_RDWR) associated with the modem 
device. The program waits on messages to send to the modem and the other modem 
could have timed out and dropped the carrier. 

Please reply to me via email, and if there is sufficent interest, I will post
the results.

Jeffrey Thompson

jsb@panix.uucp (J. S. B'ach) (12/13/90)

In article <1990Dec12.203600.3227@rigel.econ.uga.edu> jeffrey@rigel.econ.uga.edu (Jeffrey A. Thompson) writes:
)I would like to know how to determine if a modem has or doesn't have a carrier.
)The program has an open file descriptor (O_RDWR) associated with the modem 
)device. The program waits on messages to send to the modem and the other modem 
)could have timed out and dropped the carrier. 

I'd like to know how a program could determine if DTR is asserted.  For
some (probably electrical) reason, a getty will get tired of asserting
DTR and no one is able to log in from that port until it is killed and
a new getty is spawned asserting DTR (for a while )-:
I'd like to be able to run a cron task to kill any gettys which have
dropped DTR.
-- 
    jim (rutgers!cmcl2!panix!jsb,  uunet!jyacc!jsb, or uunet!echo!jimb)
 "Only our concept of time makes it possible for us to speak of the Day of 
 Judgement by that name; in reality it is a summary court in perpetual session"
 -Franz Kafka