Autore: Daniel Abrecht Data: To: dng Oggetto: Re: [DNG] issue with procps, any hints?
The tty command returns the path for fd 0, which can be different to the
controlling terminal. In C, this would be similar to ttyname(0), or
readlink("proc/self/fd/0", ...).
For the controlling terminals path, there is ctermid(0), but it will
always return "/dev/tty". But I can't think of any reason why anyone
would care about the controlling terminals path anyway.
Also, paths are always somewhat unreliable. FDs live and remain the same
as long as needed. But paths and similar things can change or vanish.