This is the mail archive of the
mailing list for the Java project.
Re: Patch: close-on-exec files
- From: Adam Megacz <patches at lists dot megacz dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 09 Mar 2002 00:01:40 -0800
- Subject: Re: Patch: close-on-exec files
- Organization: Myself
- References: <email@example.com>
Tom Tromey <firstname.lastname@example.org> writes:
> + fcntl (sock, F_SETFD, FD_CLOEXEC);
> Adam, please advise. Will this work on Windows? Is it even
Well, it definately won't work since Win32 doesn't have an 'fcntl'
function. There is an equivalent, called SetHandleInformation (use the
HANDLE_FLAG_INHERIT flag). However, right now, GCJ's Win32 binaries
can't fork(), so it doesn't (yet) matter much.
Could you throw a FIXME into Win32Process.java noting that when the
class is implemented, we need to add HANDLE_FLAG_INHERIT in
natFileDescriptor.cc, and just make sure that your fcntl()'s are
#ifndef_WIN32'd out? I'll take care of the rest.
"If I put copyrighted material into the 'chewy nougat center', I can
claim the crunchy chocolate coating is an 'Access Control
Why Windows NT/2k/XP is unreliable: www.zappadoodle.com