This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
Re: gcj/339: Process doesn't throw IOException
- To: apbianco at cygnus dot com
- Subject: Re: gcj/339: Process doesn't throw IOException
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 5 Sep 2000 17:00:01 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Tom Tromey <tromey at cygnus dot com>
The following reply was made to PR java.lang/339; it has been noted by GNATS.
From: Tom Tromey <tromey@cygnus.com>
To: Bryce McKinlay <bryce@albatross.co.nz>
Cc: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com
Subject: Re: gcj/339: Process doesn't throw IOException
Date: 05 Sep 2000 11:02:07 -0600
Bryce> Yeah, known problem. See the comments in natPosixProcess.cc
Bryce> (but thanks for the PR)
One way that I've implemented this in the past is to make a status
pipe. If the exec fails, we write `errno' as a single byte to the
pipe from the child. We also mark the write end close-on-exec, so if
the exec succeeds the parent sees the pipe close without any data
being written.
Not sure why I didn't just implement it when I wrote the code.
Tom