Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Recoskie2010-11-17 11:19:38 -0500
committerChris Recoskie2010-11-17 11:19:38 -0500
commit1ca8db05d7ea16fbfd1c7ebe475d705f785e48b4 (patch)
tree9941e36991ddf554fde9d896a635412c964c5b2f
parentd63d94859440608a247be4fc2928a98448adb0be (diff)
downloadorg.eclipse.cdt-1ca8db05d7ea16fbfd1c7ebe475d705f785e48b4.tar.gz
org.eclipse.cdt-1ca8db05d7ea16fbfd1c7ebe475d705f785e48b4.tar.xz
org.eclipse.cdt-1ca8db05d7ea16fbfd1c7ebe475d705f785e48b4.zip
Bug 330282 - AIX spawner should kill all child processes
-rw-r--r--core/org.eclipse.cdt.core.aix/library/spawner.c25
-rw-r--r--core/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.sobin11020 -> 11283 bytes
-rw-r--r--core/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.sobin27227 -> 27910 bytes
3 files changed, 20 insertions, 5 deletions
diff --git a/core/org.eclipse.cdt.core.aix/library/spawner.c b/core/org.eclipse.cdt.core.aix/library/spawner.c
index f07ce0221c..b8707ca0e2 100644
--- a/core/org.eclipse.cdt.core.aix/library/spawner.c
+++ b/core/org.eclipse.cdt.core.aix/library/spawner.c
@@ -249,23 +249,38 @@ Java_org_eclipse_cdt_utils_spawner_Spawner_raise(JNIEnv * env, jobject jobj,
switch (sig) {
case 0: /* NOOP */
- status = kill(pid, 0);
+ status = killpg(pid, 0);
+ if(status == -1) {
+ status = kill(pid, 0);
+ }
break;
case 2: /* INTERRUPT */
- status = kill(pid, SIGINT);
+ status = killpg(pid, SIGINT);
+ if(status == -1) {
+ status = kill(pid, SIGINT);
+ }
break;
case 9: /* KILL */
- status = kill(pid, SIGKILL);
+ status = killpg(pid, SIGKILL);
+ if(status == -1) {
+ status = kill(pid, SIGKILL);
+ }
break;
case 15: /* TERM */
- status = kill(pid, SIGTERM);
+ status = killpg(pid, SIGTERM);
+ if(status == -1) {
+ status = kill(pid, SIGTERM);
+ }
break;
default:
- status = kill(pid, sig); /* WHAT ?? */
+ status = killpg(pid, sig); /* WHAT ?? */
+ if(status == -1) {
+ status = kill(pid, sig); /* WHAT ?? */
+ }
break;
}
diff --git a/core/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so b/core/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so
index 5a777eb82d..67ad769242 100644
--- a/core/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so
+++ b/core/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so
Binary files differ
diff --git a/core/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so b/core/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so
index 19c8c1dd60..e7b411361b 100644
--- a/core/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so
+++ b/core/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so
Binary files differ

Back to the top