diff options
author | Chris Recoskie | 2010-11-17 16:19:38 +0000 |
---|---|---|
committer | Chris Recoskie | 2010-11-17 16:19:38 +0000 |
commit | 1ca8db05d7ea16fbfd1c7ebe475d705f785e48b4 (patch) | |
tree | 9941e36991ddf554fde9d896a635412c964c5b2f /core/org.eclipse.cdt.core.aix/library | |
parent | d63d94859440608a247be4fc2928a98448adb0be (diff) | |
download | org.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
Diffstat (limited to 'core/org.eclipse.cdt.core.aix/library')
-rw-r--r-- | core/org.eclipse.cdt.core.aix/library/spawner.c | 25 |
1 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 f07ce0221c9..b8707ca0e2b 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; } |