Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.wizards Subject: Re: How to set control tty (Sys5) Message-ID: <1990Jul06.015108.14622@virtech.uucp> Date: 6 Jul 90 01:51:08 GMT References: <483@trux.UUCP> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 16 In article <483@trux.UUCP> car@trux.UUCP (Chris Rende) writes: >However, I can't figure/find out how to set the control tty. I read in >TERMIO(7) something like "The first terminal file that gets opened becomes >the control terminal". When I wrote a program that disassociates itself from >the control terminal and then does a "fd=open("/dev/ttyi00",O_RDWR);" >it didn't work. I.e, a "ps -ef" shows "?" for the control tty. The other requirement is that no other proces has that terminal as its controlling terminal. I would guess that your test is failing because the tty is the controlling terminal for another process. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170