Patch: Win32 Process Implementation
Tom Tromey
tromey@redhat.com
Mon Feb 10 23:53:00 GMT 2003
>>>>> "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
More information about the Java-patches
mailing list