How to set control tty (Sys5)

Bob McGowen x4312 dept208 bob at wyse.wyse.com
Sat Jul 7 01:26:50 AEST 1990


In article <1990Jul06.015108.14622 at virtech.uucp> cpcahil at virtech.UUCP (Conor P. Cahill) writes:
>In article <483 at trux.UUCP> car at 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 at wyse.com



More information about the Comp.unix.wizards mailing list