Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!im4u!ut-sally!utah-cs!utah-gr!stride!stride1!mitch From: mitch@stride1.UUCP (Thomas P. Mitchell) Newsgroups: comp.unix.wizards Subject: Re: /dev/tty doesn't exist? Message-ID: <706@stride.Stride.COM> Date: 5 Jan 88 20:09:31 GMT References: <445@minya.UUCP > <167@sdeggo.UUCP> Sender: news@stride.Stride.COM Reply-To: mitch@stride1.Stride.COM (Thomas P. Mitchell) Organization: MicroSage Comp. Sys. Inc., 680 S. Rock Blvd, Reno, NV 89502 Lines: 51 Summary: look at man 4 tty In article <167@sdeggo.UUCP> dave@sdeggo.UUCP (David L. Smith) writes: >In article <445@minya.UUCP >, jc@minya.UUCP (John Chambers) writes: > > > > Perhaps the question could be rephrased: What is the official, approved > > way for a daemon process like this to attach a terminal? If the answer > > is RTFM.... It is in the manual but a bit hard to find. Try "man man" and look for an option "man -f something". Keep the 'something' simple because a simple minded grep is done on the man page headers. Here is part of the result of "man -f tty" on this system. Note that two 'tty' man pages exist. getty (8) - set terminal type, modes, speed, and line discipline stty (1) - set the options for a terminal tty (1) - get the name of the terminal tty (4) - controlling terminal interface >The problem would seem to be that /dev/tty has no idea what tty you really >want to be talking to. In order to set things up, you need to do a >setpgrp() and then open the terminal you wish to talk to. Termio(7) briefly >explains about the control terminal. > It (/dev/tty) is a clever pseudo device. The key is that it figures out which "real" device the process is connected to. ======== man page follows ======= this system's "man 4 tty" === NAME tty - controlling terminal interface DESCRIPTION The file /dev/tty is, in each process, a synonym for the control terminal associated with the process group of that process, if any. It is useful for programs or shell sequences that wish to be sure of writing messages on the terminal no matter how output has been redirected. It can also be used for programs that demand the name of a file for output, when typed output is desired and it is tiresome to find out what terminal is currently in use. FILES /dev/tty /dev/tty* Thomas P. Mitchell (mitch@stride1.Stride.COM) Phone: (702) 322-6868 TWX: 910-395-6073 MicroSage Computer Systems Inc. a Division of Stride Micro. Opinions expressed are probably mine.