summaryrefslogtreecommitdiff
path: root/src/unistd/isatty.c
blob: cff6e9fe4334fc801d921951c0ff82618cdcf44e (plain)
1
2
3
4
5
6
7
8
#include <unistd.h>
#include <termios.h>

int isatty(int fd)
{
	struct termios t;
	return tcgetattr(fd, &t) == 0;
}