get_tty_settings
if (!get_tty_settings(STDERR_FILENO, tty_settings) &&
!get_tty_settings(STDOUT_FILENO, tty_settings) &&
!get_tty_settings(STDIN_FILENO, tty_settings)) {
if (!get_tty_settings(fd, tty_settings)) {