This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/33218] Process.waiFor() Process.destroy() misbehave for childs which are not reacting to Ctrl+C SIGQUIT
- From: "cyberflex at mail dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2007 16:43:40 -0000
- Subject: [Bug java/33218] Process.waiFor() Process.destroy() misbehave for childs which are not reacting to Ctrl+C SIGQUIT
- References: <bug-33218-14857@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from cyberflex at mail dot ru 2007-08-28 16:43 -------
(In reply to comment #1)
> Can you post a fully self contained test case? If I can easily reproduce it, I
> will try to fix it.
>
Test case is to be following, but reproducing looks like to be a bit tricky :(
gcj (GCC) 4.1.2 20061115 (prerelease) (SUSE Linux) doesn't show such behaviour,
I'll try (in a few days) this once more with my real scripts and real hardware
platfrom that compiler. Then I'll post more detailed report to this bug.
May be the problem is observed only when script is sleep in syscall only.
Yet I could kill script manually, so it might not be a kernel issue.
test.java
import java.lang.*;
public class test{
public static void main(String[] args) throws Exception{
String cmd = "./test.sh";
Process p = Runtime.getRuntime().exec(cmd);
p.destroy();
p.waitFor();
System.out.println("waitFor completed");
while(1 == 1){
Thread.currentThread().sleep(3000);
}
}
}
test.sh:
#!/bin/bash
trap "" SIGINT
trap "" SIGQUIT
Thanks.
--
cyberflex at mail dot ru changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cyberflex at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33218