HH\Lib\OS\ttyname

Meta Engineer?

This is available as OS\ttyname in the 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