HH\Lib\OS\ttyname

Facebook Engineer?

This function is available as OS\ttyname() in Facebook's www repository.

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