diff options
author | membar <membar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-07 03:13:56 +0000 |
---|---|---|
committer | membar <membar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-07 03:13:56 +0000 |
commit | 2e2260d6809dee2fdf355328735976ff2b603397 (patch) | |
tree | c9570d50348a6ac911e60fd0d891fb96bfe37fcc /libjava/java | |
parent | 21aa3ae9aac9eeeaa7470284d0d8ead0e732d65d (diff) | |
download | ppe42-gcc-2e2260d6809dee2fdf355328735976ff2b603397.tar.gz ppe42-gcc-2e2260d6809dee2fdf355328735976ff2b603397.zip |
* include/win32.h (_Jv_platform_close_on_exec): Changed
signature and declared extern.
* win32.cc (_Jv_platform_close_on_exec): Implemented.
* gnu/java/net/natPlainDatagramSocketImplWin32.cc
(create): Use new signature of _Jv_platform_close_on_exec.
* gnu/java/net/natPlainSocketImplWin32.cc
(create): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
(accept): Eliminated a few typecasts
Use new signature of _Jv_platform_close_on_exec.
* java/io/natFileDescriptorWin32.cc (open): Use
_Jv_platform_close_on_exec.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73325 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/io/natFileDescriptorWin32.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libjava/java/io/natFileDescriptorWin32.cc b/libjava/java/io/natFileDescriptorWin32.cc index 1891bf78e42..465d7557992 100644 --- a/libjava/java/io/natFileDescriptorWin32.cc +++ b/libjava/java/io/natFileDescriptorWin32.cc @@ -133,7 +133,13 @@ java::io::FileDescriptor::open (jstring path, jint jflags) { throw new FileNotFoundException (_Jv_WinStrError (cpath, dwErrorCode)); } } - return (jint)handle; + + // Make this handle non-inheritable so that child + // processes don't inadvertently prevent us from + // closing this file. + _Jv_platform_close_on_exec (handle); + + return (jint) handle; } void |