Community
Participate
Working Groups
Build Identifier: I20100608-0911 When running an external batch script and trying to stop that (using the red square in the console view) it will not stop the tool. When looking at the process list you can see that only the initially invoked process is killed but not the children. What is necessary is that the "red square" kills the complete process tree of the initially invoked process. Due to that problem I cannot use the "Run external tools" at all. Reproducible: Always Steps to Reproduce: 1. Take the attached project 2. Run the external launch configuration 3. Stop it using the red square in the console view 4. Take a look at the process list. You can see that sleep.exe and tee.exe are still running
Created attachment 183449 [details] Contains the launch configuration where the bug can be reproduced
Created attachment 187633 [details] Plugin that overwrites TerminateCommand for proper process killing in windows The attached plugin first deregisters the CommandAdapterFactory that provides the command for terminating processes within eclipse. Then a new command factory is registered that provides a customized command for terminating processes recursively under windows. It is pretty dirty. A better solution would be to: 1. Provide means to give certain adapter factories a higher priority than other factories for the same adaptable so that the high prio factory is taken instead the first registered one OR 2. Sort of an extension point for providing a terminate command for terminating processes when created by "Run external tools".
The new plugin only changes the red square stop button in the "Console" view. If the red square from the job in the "Progress" view is klicked the command line call is not killed properly.
(In reply to comment #3) > The new plugin only changes the red square stop button in the "Console" view. > If the red square from the job in the "Progress" view is klicked the command > line call is not killed properly. The reason for this behaviour is that also the class ProgramLaunchDelegate need to be changed. The respective part to change looks like this: while (!process.isTerminated()) { try { if (monitor.isCanceled()) { --->>> process.terminate(); break; } Thread.sleep(50); } catch (InterruptedException e) { } } The marked line need to be replaced by a custom implementation so that the process can be killed properly.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. If the bug is still relevant, please remove the "stalebug" whiteboard tag.