Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] discrepancy in Spawner behaviour

On Mon, Nov 8, 2010 at 11:26 AM, Chris Recoskie <recoskie@xxxxxxxxxx> wrote:
> I have noticed a problem on AIX, in that the Spawner does not seem to kill
> all child processes of the launched process when you call destroy() on them,
> which in turn does a raise() with an appropriate signal. It's a real problem
> because if you do a recursive make, not all of the children will be properly
> killed if you cancel the build.
>
> I dug a bit further and the Linux spawner doesn't have this problem because
> when it tries to send a signal to kill the process in raise(), it first
> tries to use the killpg() system call to send the signal to the entire
> process group rooted at the PID that was spawned. Then if that fails, it
> uses kill() on the process itself.
>
> I.e., it does:
>
> case 9: /* KILL */
> status = killpg(pid, SIGKILL);
> if(status == -1) {
> status = kill(pid, SIGKILL);
> }
> break;
>
> The AIX spawner doesn't use killpg(). It does this:
>
> case 9: /* KILL */
> status = kill(pid, SIGKILL);
> break;
>
> However, the killpg() system call seems available on all the AIX versions
> I've checked (I've checked AIX 5.3 and up so far... 5.3 is the oldest we are
> supporting ourselves with our tools at IBM). Right now I'm inclined to
> modify the AIX spawner so that its behaviour matches that of the Linux
> spawner.
>
> Does anyone (Doug?) know why the AIX spawner differs from the Linux one?
> Does anyone object to me changing it so that it behaves the same? My guess
> is that way back when the spawner was created, we were supporting some
> decrepit, old version of AIX that didn't have killpg(), but I think it's
> safe to use it now.

I have no recollection of doing this so it probably predates killpg
availability on AIX.

Given the download numbers for the AIX version of CDT and the total
lack of it as a supported platform for CDT-based products that I know
of, I'm pretty sure you can do what you like with it.

Doug.


Back to the top