Function: process-tty-name
process-tty-name is a function defined in process.c.
Signature
(process-tty-name PROCESS)
Documentation
Return the name of the terminal PROCESS uses, or nil if none.
This is the terminal that the process itself reads and writes on, not the name of the pty that Emacs uses to talk with that terminal.
Probably introduced at or before Emacs version 19.29.
Source Code
// Defined in /usr/src/emacs/src/process.c
{
CHECK_PROCESS (process);
return XPROCESS (process)->tty_name;
}