Community
Participate
Working Groups
From my email to cdt-dev... > 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.
Created attachment 183309 [details] patch Patch attached. While I was at it, I rebuilt the libraries using XLC v8, so they are likely better optimized now. CVS won't do patches for binaries, so they contents of those aren't included in the patch.
*** cdt cvs genie on behalf of crecoskie *** Bug 330282 - AIX spawner should kill all child processes [*] libspawner.so 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so?root=Tools_Project&r1=1.3&r2=1.4 [*] libpty.so 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so?root=Tools_Project&r1=1.3&r2=1.4 [*] spawner.c 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core.aix/library/spawner.c?root=Tools_Project&r1=1.5&r2=1.6
Fixed on cdt_7_0 and HEAD.
*** cdt cvs genie on behalf of crecoskie *** Bug 330282 - AIX spawner should kill all child processes [*] libspawner.so 1.3.22.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core.aix/os/aix/ppc/libspawner.so?root=Tools_Project&r1=1.3&r2=1.3.22.1 [*] libpty.so 1.3.22.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core.aix/os/aix/ppc/libpty.so?root=Tools_Project&r1=1.3&r2=1.3.22.1