how to determine if a process has access to tty ports

Sean Sheridan Coleman X5672 coleman at cam.nist.gov
Wed Jan 23 13:53:48 AEST 1991


I want to be able to determine if another process has control
of an RS232 port on a Alm Board on a Sun4. I am writing a 
program to gather data from a device that is connected via
RS-232. I want to deny access to the program if another program
is accessing the port currently. 

I want to know (1) how to tell if a port is being used
currently for a login port. ie.. some has log in using the port
(2) how to tell if a process has control of a port for out going
communication such as kermit?

I use a simplistic tty driver for comunicating to the  ports.
Is there something I should add to the driver code to allow
other programs to do what I have asked about above?

Thanks

Sean Coleman
NIST
coleman at bldrdoc.gov



More information about the Comp.unix.questions mailing list