Author: sgoeschl
Date: Thu Aug 12 18:12:00 2010
New Revision: 984891

URL: http://svn.apache.org/viewvc?rev=984891&view=rev
Log:
[EXEC-46] resetting the interrupted flag after Process.waitFor() to be on the 
save side

Modified:
    
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java

Modified: 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
URL: 
http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java?rev=984891&r1=984890&r2=984891&view=diff
==============================================================================
--- 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
 (original)
+++ 
commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/DefaultExecutor.java
 Thu Aug 12 18:12:00 2010
@@ -333,6 +333,13 @@ public class DefaultExecutor implements 
             } catch (InterruptedException e) {
                 process.destroy();
             }
+            finally {
+                // see http://bugs.sun.com/view_bug.do?bug_id=6420270
+                // see https://issues.apache.org/jira/browse/EXEC-46
+                // Process.waitFor should clear interrupt status when throwing 
InterruptedException
+                // but we have to do that manually
+                Thread.interrupted();
+            }            
 
             if (watchdog != null) {
                 watchdog.stop();


Reply via email to