This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: Win32 Process Implementation
- From: Tom Tromey <tromey at redhat dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 10 Feb 2003 16:42:39 -0700
- Subject: Re: Patch: Win32 Process Implementation
- References: <b1ufnb$39j$1@main.gmane.org>
- Reply-to: tromey at redhat dot com
>>>>> "Ranjit" == Ranjit Mathew <rmathew@hotmail.com> writes:
Ranjit> Here is a simple implementation of java.lang.Process for Win32.
Ranjit> It works for simple test cases and well enough to produce
Ranjit> symbolic information in stacktraces via addr2line and c++filt, the
Ranjit> need for which in fact prompted this effort in the first place!
Nice. I'm checking this in to 3.3 and 3.4.
Ranjit> 2. ReadFile( ) on Win32 gives an ERROR_BROKEN_PIPE when the
Ranjit> parent process is reading from the child's output/error
Ranjit> streams and the child exits, unlike read( ) on Unix which
Ranjit> simply indicates an EOF. This causes an IOException in GCJ,
Ranjit> which does not happen BTW, in Sun's JDK. I would suggest that
Ranjit> we modify natFileDescriptorWin32.cc to return -1 (EOF) in
Ranjit> read( ) when it encounters an ERROR_BROKEN_PIPE on a ReadFile(
Ranjit> ), to avoid this error.
You're the expert. If you say we should do it, let's do it.
(It certainly sounds reasonable to me...)
Ranjit> Finally, Tom I hope this patch's format is acceptable to you.
Yeah, though part of it didn't apply cleanly. I fixed it up by hand.
I don't know what went wrong, since the patch certainly looked fine.
It was definitely less work than the previous patch though.
Tom