Bug 19207

Summary: [ExternalTools] Shell script cannot be cancelled and can hang Eclipse
Product: [Eclipse Project] Platform Reporter: Adam Schlegel <Adam_Schlegel>
Component: AntAssignee: Ryan Cooper <ryan_cooper>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P2 CC: n.a.edgar, simon_arsenault
Version: 2.0Keywords: ui
Target Milestone: 2.0 F3   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Adam Schlegel CLA 2002-06-04 16:21:12 EDT
The following shell script will hang Eclipse when it is run as an External 
tool. The problem seems to be that the script is waiting for keyboard input, 
but Eclipse cannot provide any. 

#! /bin/sh
cat

The real problem here is that the cancel button on the progress monitor does 
not kill execution of the shell script, and recover. The script seems to be run 
in a state such that the cancelled status of the progress monitor is not being 
polled.
Comment 1 Simon Arsenault CLA 2002-06-06 13:06:30 EDT
It's probably because the program runner waits on the process running the 
external program. We could change it to have a loop to poll the status of the 
process and then sleep.

I guess the question is how likely will someone run an external tool that will 
prompt for information?
Comment 2 Nick Edgar CLA 2002-06-06 16:58:49 EDT
The hang could be avoided if we ran external tools in another thread and 
avoided the progress monitor.

Comment 3 Ryan Cooper CLA 2002-06-07 13:10:04 EDT

*** This bug has been marked as a duplicate of 17112 ***