diff options
| author | Bert Münnich <ber.t@posteo.de> | 2017-10-19 14:07:56 +0200 |
|---|---|---|
| committer | Bert Münnich <ber.t@posteo.de> | 2018-12-29 19:19:11 +0100 |
| commit | ff1290cbb138dd09b0a3ca842f843b8321b4c3fe (patch) | |
| tree | 9588b4987f975e6fa29b798cff34fe5b720f6ac2 /nonblock.c | |
| parent | c378e80e4ccbe7c5950230e29d4d44fe162f7d06 (diff) | |
Handwritten Makefile and config.h; no more GNU autohell
Diffstat (limited to 'nonblock.c')
| -rw-r--r-- | nonblock.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/nonblock.c b/nonblock.c deleted file mode 100644 index dbe31d3..0000000 --- a/nonblock.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Set stdin to nonblocking. */ -#include <sys/types.h> -#include <unistd.h> -#include <fcntl.h> -#include <errno.h> -int main(void) { - int flags; - flags = fcntl(0, F_GETFL); - flags |= O_NONBLOCK; - fcntl(0, F_SETFL, (long) flags); - flags = read(0, &flags, 1); - printf("read returns %d, errno == %d\n", flags, errno); - return 0; -} |