Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!mips!wyse!bob From: bob@wyse.wyse.com (Bob McGowen x4312 dept208) Newsgroups: comp.unix.wizards Subject: Re: How to set control tty (Sys5) Message-ID: <2784@wyse.wyse.com> Date: 6 Jul 90 15:26:50 GMT References: <483@trux.UUCP> <1990Jul06.015108.14622@virtech.uucp> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen x4312 dept208) Organization: Wyse Technology Lines: 27 In article <1990Jul06.015108.14622@virtech.uucp> cpcahil@virtech.UUCP (Conor P. Cahill) writes: >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 ----- >>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. ----- Another possibility is that the open blocked waiting for some line condition, such as carrier detect. In my experience the "?" in the tty column of ps output either means a process with no controlling terminal (which is what I believe you are assuming) OR a line on which an open has begun but NOT completed. In the latter case there is no information available for ps to tell which line is involved. Check the open() man page for details on the O_NDELAY flag. When it is set and the open is on a communications line the open will return without waiting for carrier. Good luck. Bob McGowan (standard disclaimer, these are my own ...) Product Support, Wyse Technology, San Jose, CA ..!uunet!wyse!bob bob@wyse.com