ttyname function

String ttyname(
  1. int fd
)

Return the pathname of the terminal associate with the fd or null if no terminal is associated with the fd

Throws a PosixException if an error occurs.

This method is not thread safe.

Implementation

String ttyname(
  int fd,
) {
  final cName = native_ttyname(fd);

  return cName.cast<Utf8>().toDartString();
}