qfedu-linux-advanced-level/day2/homework/hx.c

15 lines
292 B
C
Raw Permalink Normal View History

2023-08-15 23:23:31 +08:00
#include <stdio.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main(int argc, char const *argv[])
{
int flags = fcntl(STDIN_FILENO, F_GETFL);
flags ^= O_NONBLOCK;
fcntl(STDIN_FILENO, F_SETFL, flags);
return 0;
}