shithub: npe

ref: ab547d8e97c1bbedfff2fe7d5ff18fc3171abc6d
dir: /libnpe/isatty.c/

View raw version
#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;
}