From f2fdbe5540c3954bd62a6ec6d701132a65110d27 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 8 Jul 2000 10:57:08 +1000 Subject: - (djm) Handle EWOULDBLOCK returns from read() and write() in atomicio.c Fix from Marquess, Steve Mr JMLFDC --- atomicio.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'atomicio.c') diff --git a/atomicio.c b/atomicio.c index 7d9f9340..45da22d3 100644 --- a/atomicio.c +++ b/atomicio.c @@ -46,7 +46,11 @@ atomicio(f, fd, _s, n) res = (f) (fd, s + pos, n - pos); switch (res) { case -1: +#ifdef EWOULDBLOCK + if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) +#else if (errno == EINTR || errno == EAGAIN) +#endif continue; case 0: return (res); -- cgit v1.2.1