From 51f808d12f2ead5554ca7ff2832f60b7c51c6f52 Mon Sep 17 00:00:00 2001 From: Tyrolyean Date: Sun, 17 Jul 2022 23:53:44 +0200 Subject: [PATCH] Revert "Add fix for O_NONBLOCK file-descriptor as output pipe" This reverts commit be8f7d1716024894a67b10cc290b18c1a430e5ae. This was reverted as with this commit the program would consume large amounts of cpu time just looping and calling the write function, which would not block. --- shadermeh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shadermeh.c b/shadermeh.c index f85b3f1..6c7503b 100644 --- a/shadermeh.c +++ b/shadermeh.c @@ -51,7 +51,7 @@ static int write_retry(int fd, const void *buffer, size_t size) int ret = write(fd, buffer, size); if (ret < 0) { - if (errno == EINTR || errno == EAGAIN) + if (errno == EINTR) continue; perror("write"); return -1;