mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-19 19:59:43 +00:00
0f5f65479e
DDD handles controlling terminals for child processes. No response from maintainer since: Sat, 22 Aug 2009
33 lines
1.0 KiB
C
33 lines
1.0 KiB
C
--- ddd/TTYAgent.C.orig 2009-02-11 12:25:07.000000000 -0500
|
|
+++ ddd/TTYAgent.C 2009-08-22 23:43:03.712807083 -0400
|
|
@@ -280,7 +280,9 @@
|
|
#if !defined(__osf__) && \
|
|
HAVE_PTSNAME && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_IOCTL
|
|
#define HAVE_UNIX98PTYS 1
|
|
+#if !defined(__FreeBSD__)
|
|
#define HAVE_STREAMS_IMPLEMENTATION 1
|
|
+#endif
|
|
// FIXME: We should have a proper test for this.
|
|
// For instance, GNU libc 2.1 on Linux (and probably HURD too) has UNIX98-style
|
|
// pty allocation functions, but does not have a STREAMS-based implementation.
|
|
@@ -715,8 +717,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
|
|
|