ref: 2aee89298cbbf5c1b4d50e70733b52ae75c706fd
dir: /libnpe/isatty.c/
#include <unistd.h>
#include "_npe.h"
int
isatty(int fd)
{
char buf[64];
return fd2path(fd, buf, sizeof(buf)) == 0 && strcmp(buf, "/dev/cons") == 0 && access("/env/TERM", AEXIST) == 0;
}