Implement isatty

This commit is contained in:
jD91mZM2
2018-07-26 14:19:20 +02:00
parent 7ff6940edd
commit 2bf426b0fb
19 changed files with 296 additions and 13 deletions
+11
View File
@@ -0,0 +1,11 @@
#include <stdio.h>
#include <unistd.h>
int main() {
// 1 is stdout
if (isatty(1)) {
puts("'Tis a tty :D");
} else {
puts("Whatever a tty is, it's not me");
}
}