How to make a tty un'open(2)'able after another process opens it
Rick Schubert
rns at se-sd.SanDiego.NCR.COM
Wed Sep 19 01:00:06 AEST 1990
In <2699 at unccvax.uncc.edu> cs00chs at unccvax.uncc.edu (charles spell) writes:
>Is there a way (besides lock files) that I can set a /dev/tty* to be
>unopenable by other processes once it is opened by a process? The optimal
>way would be for open() to return -1 if the tty is already being used.
Wouldn't `chmod(0)' do the trick (make sure you change it back when you
are through, though)?
-- Rick Schubert (rns at se-sd.sandiego.NCR.COM)
More information about the Comp.unix.questions
mailing list