Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (21 sloc) 487 Bytes
#include <stdio.h>
#include <unistd.h>
//#define HAS_READ
int main (void)
{
int i = 0;
int tty = isatty (STDIN_FILENO);
printf ("stdin isatty ? %s\n", tty ? "true" : "false");
tty = isatty (STDOUT_FILENO);
printf ("stdout isatty ? %s\n", tty ? "true" : "false");
while (i++ < 10)
{
printf ("turn %d\n", i);
sleep (1);
printf ("type any char to continue\n");
#ifdef HAS_READ
getchar ();
#endif
}
return 0;
}
You can’t perform that action at this time.