changeset 7075:98c8aed0346d

. Merge in the OpenBSD version of closeDescriptors that previously resided in UNIXProcess_md.c.
author Greg Lewis <glewis@eyesbeyond.com>
date Sun, 20 Apr 2014 11:17:37 -0700
parents 43b8a9ce4c53
children be638dc60a3e
files src/solaris/native/java/lang/childproc.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/java/lang/childproc.c	Sun Apr 20 11:16:43 2014 -0700
+++ b/src/solaris/native/java/lang/childproc.c	Sun Apr 20 11:17:37 2014 -0700
@@ -62,6 +62,16 @@
   return c >= '0' && c <= '9';
 }
 
+#if defined(__OpenBSD__)
+static int
+closeDescriptors(void)
+{
+	    int err;
+	        RESTARTABLE(closefrom(FAIL_FILENO + 1), err);
+		    return err;
+}
+#else
+
 #ifdef _ALLBSD_SOURCE
 #define FD_DIR "/dev/fd"
 #define dirent64 dirent
@@ -104,6 +114,7 @@
 
     return 1;
 }
+#endif
 
 int
 moveDescriptor(int fd_from, int fd_to)