ref: 1cf523a5e0dc72fd9d41aa434e3359ff08c5406e 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; }