ab84ac8ecf
- Grant maintainership to submitter PR: ports/70894 Submitted by: Sergio Mangialardi <sergio@softshark.org>
22 lines
581 B
C
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
|
|
|