summaryrefslogtreecommitdiffstats
path: root/libjava/include/posix.h
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-10 17:59:23 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2002-03-10 17:59:23 +0000
commitfa9699000423f3e3229549c9048b01cd8e9b82fa (patch)
tree45c63f7bfa318f36096be3612f34f51fc377a300 /libjava/include/posix.h
parentca3d0fae494bfb5f1709d6cca598bc93251bbf39 (diff)
downloadppe42-gcc-fa9699000423f3e3229549c9048b01cd8e9b82fa.tar.gz
ppe42-gcc-fa9699000423f3e3229549c9048b01cd8e9b82fa.zip
* java/lang/Win32Process.java: Added comment.
* include/posix.h (_Jv_platform_close_on_exec): New function. Include fcntl.h. * include/win32.h (_Jv_platform_close_on_exec): New function. * java/net/natPlainSocketImpl.cc (create): Set close-on-exec flag. (accept): Likewise. * java/net/natPlainDatagramSocketImpl.cc (create): Set close-on-exec flag. * java/io/natFileDescriptorPosix.cc (open): Set close-on-exec flag. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@50536 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/include/posix.h')
-rw-r--r--libjava/include/posix.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/libjava/include/posix.h b/libjava/include/posix.h
index f96507405de..05c6ddfad4c 100644
--- a/libjava/include/posix.h
+++ b/libjava/include/posix.h
@@ -28,13 +28,17 @@ details. */
#include <unistd.h>
#endif
+#include <fcntl.h>
+
#include <gcj/cni.h>
extern int _Jv_select (int n, fd_set *, fd_set *, fd_set *, struct timeval *);
extern jlong _Jv_platform_gettimeofday ();
extern void _Jv_platform_initialize (void);
-
-
-
-
+inline void
+_Jv_platform_close_on_exec (jint fd)
+{
+ // Ignore errors.
+ fcntl (fd, F_SETFD, FD_CLOEXEC);
+}
OpenPOWER on IntegriCloud