freebsd-ports/devel/ddd/files/patch-ddd::TTYAgent.C
Tilman Keskinoz 6158be8800 Update to 3.3.10
PR:		74176
Submitted by:	Sergio Mangialardi <sergio@softshark.org>
2004-12-04 19:34:14 +00:00

22 lines
581 B
C

--- ddd/TTYAgent.C.orig Sat Nov 6 19:05:52 2004
+++ ddd/TTYAgent.C Sat Nov 6 19:08:23 2004
@@ -715,8 +715,19 @@
}
else
{
+#if !defined(__FreeBSD__)
if (fcntl(master, F_SETFL, flags | O_NONBLOCK) == -1)
_raiseIOWarning("cannot set file to non-blocking mode");
+#else
+ do {
+ if(fcntl(master, F_SETFL, flags | O_NONBLOCK) != -1)
+ break;
+ else if(errno == EAGAIN)
+ sleep(1);
+ else
+ _raiseIOWarning("cannot set file to non-blocking mode");
+ } while(errno == EAGAIN);
+#endif
}
#endif