diff options
author | Tom Tromey <tromey@redhat.com> | 2002-03-10 17:59:23 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-03-10 17:59:23 +0000 |
commit | 0c1fcb02b154cf1840914c4b5d96a495690376e0 (patch) | |
tree | 45c63f7bfa318f36096be3612f34f51fc377a300 /libjava/java/io | |
parent | b29bb8325b6d6be0353a25285fcc697b55451ab1 (diff) | |
download | gcc-0c1fcb02b154cf1840914c4b5d96a495690376e0.zip gcc-0c1fcb02b154cf1840914c4b5d96a495690376e0.tar.gz gcc-0c1fcb02b154cf1840914c4b5d96a495690376e0.tar.bz2 |
Win32Process.java: Added comment.
* 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.
From-SVN: r50536
Diffstat (limited to 'libjava/java/io')
-rw-r--r-- | libjava/java/io/natFileDescriptorPosix.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libjava/java/io/natFileDescriptorPosix.cc b/libjava/java/io/natFileDescriptorPosix.cc index 5352f99..bfe0009 100644 --- a/libjava/java/io/natFileDescriptorPosix.cc +++ b/libjava/java/io/natFileDescriptorPosix.cc @@ -17,7 +17,6 @@ details. */ #include <string.h> #include <sys/stat.h> #include <sys/param.h> -#include <fcntl.h> #ifdef HAVE_SYS_IOCTL_H #define BSD_COMP /* Get FIONREAD on Solaris2. */ @@ -122,6 +121,9 @@ java::io::FileDescriptor::open (jstring path, jint jflags) sprintf (msg, "%s (%s)", buf, strerror (errno)); throw new FileNotFoundException (JvNewStringLatin1 (msg)); } + + _Jv_platform_close_on_exec (fd); + return fd; } |