HH\Lib\OS\ttyname
Requires the Hack Standard Library - Experimental Additions to be installed.
Get the name of the terminal associated with a file descriptor, if any
namespace HH\Lib\OS;
function ttyname(
FileDescriptor $fd,
): string;
This function will throw if an error occurs; you may want to specifically
handle ENOTTY
.
Parameters
FileDescriptor $fd
Returns
string