freebsd-ports/devel/ddd/files/patch-ddd::TTYAgent.C
Pav Lucistnik ab84ac8ecf - Update to 3.3.9
- Grant maintainership to submitter

PR:		ports/70894
Submitted by:	Sergio Mangialardi <sergio@softshark.org>
2004-08-29 20:17:24 +00:00

22 lines
581 B
C

--- ddd/TTYAgent.C.orig Thu Aug 19 20:41:45 2004
+++ ddd/TTYAgent.C Thu Aug 19 20:45:56 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