Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!emory!hubcap!ncrcae!ncr-sd!se-sd!rns From: rns@se-sd.SanDiego.NCR.COM (Rick Schubert) Newsgroups: comp.unix.questions Subject: Re: How to make a tty un'open(2)'able after another process opens it Keywords: open(2), ioctl(2) Message-ID: <3878@se-sd.SanDiego.NCR.COM> Date: 18 Sep 90 15:00:06 GMT References: <2699@unccvax.uncc.edu> Organization: NCR Corporation, Systems Engineering - San Diego Lines: 10 In <2699@unccvax.uncc.edu> cs00chs@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@se-sd.sandiego.NCR.COM)