public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/11801] New: Problems with Process.waitFor() and exitValue()
@ 2003-08-05  5:04 bryce at mckinlay dot net dot nz
  2003-08-05  5:21 ` [Bug libgcj/11801] " pinskia at physics dot uc dot edu
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bryce at mckinlay dot net dot nz @ 2003-08-05  5:04 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11801

           Summary: Problems with Process.waitFor() and exitValue()
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bryce at mckinlay dot net dot nz
                CC: gcc-bugs at gcc dot gnu dot org

There are some bugs with libgcj's POSIX Runtime.exec implementation.

Problem #1: Process.exitValue() only returns the processes exit code if waitFor() has already been 
called, because only waitFor() ever calls waitpid.

Problem #2: Process.waitFor() and Process.exitValue() do not work if they are called from a thread 
other than the thread which called Runtime.exec().  This seems to be because the pid created in 
Runtime.exec() is only considered a child of the thread which created it.

Currently the problem can be hidden in some cases because Process.waitFor() will actually return 0 
if waitpid returns an error other than EINTR.

Possible solution: SIGCHLD handler?


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-03-24  6:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-05  5:04 [Bug libgcj/11801] New: Problems with Process.waitFor() and exitValue() bryce at mckinlay dot net dot nz
2003-08-05  5:21 ` [Bug libgcj/11801] " pinskia at physics dot uc dot edu
2003-08-05  5:51 ` bryce at mckinlay dot net dot nz
2003-08-23  1:09 ` dhazeghi at yahoo dot com
2003-09-28 20:39 ` tromey at gcc dot gnu dot org
2003-11-08  1:29 ` pinskia at gcc dot gnu dot org
2003-11-08  1:38 ` daney at gcc dot gnu dot org
2003-11-08  1:45 ` bryce at mckinlay dot net dot nz
2004-03-24  6:39 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).