blob: 96203e6c4e385cb3ce9d20e9c5643525a61b7a05 [file] [log] [blame] [raw]
#include <unistd.h>
int isatty(int fd) {
//if(fd != STDOUT_FILENO || fd != STDERR_FILENO) return 0;
switch(fd) {
case STDIN_FILENO:
return 1; // XXX
case STDOUT_FILENO:
return _get_stdout_fd() == TTY_FD_DEFAULT;
case STDERR_FILENO:
return _get_stderr_fd() == TTY_FD_DEFAULT;
default:
return 0;
}
}