diff options
Diffstat (limited to 'lib/libc/unistd/isatty.c')
| -rw-r--r-- | lib/libc/unistd/isatty.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libc/unistd/isatty.c b/lib/libc/unistd/isatty.c new file mode 100644 index 00000000..afb15460 --- /dev/null +++ b/lib/libc/unistd/isatty.c @@ -0,0 +1,10 @@ +#include <termios.h> +#include <unistd.h> +#include <syscall.h> +#include <asm-generic/ioctls.h> + +int isatty(int fildes) +{ + struct winsize winsize; + return 1 + syscall(ioctl, fildes, TIOCGWINSZ, &winsize); +} |
