summaryrefslogblamecommitdiff
path: root/src/unistd/isatty.c
blob: c8badaf55edd7d6c4e692e5d238e093848cc7290 (plain) (tree)
1
2
3
4
5
6
7
8
9
                   

                      


                  

                                                           
 
#include <unistd.h>
#include <sys/ioctl.h>
#include "syscall.h"

int isatty(int fd)
{
	struct winsize wsz;
	return !__syscall(SYS_ioctl, fd, TIOCGWINSZ, &wsz);
}