ttyname() - question

Karl Heuer karl at haddock.ima.isc.com
Thu Aug 31 10:48:39 AEST 1989


In article <1088 at virtech.UUCP> cpcahil at virtech.UUCP (Conor P. Cahill) writes:
>Of course if the user redirects all three, you're out of luck (unless you
>open /dev/tty and then call ttyname() with the fd returned from the open).

In which case you'll probably (depending on flavor) get the return string
"/dev/tty" rather than the true name of the terminal.  (Assuming the open
succeeds in the first place.  Not every process has a controlling terminal.)



More information about the Comp.lang.c mailing list