[FELIX-2723] When the execution of a closure with pipes is interrupted, pipes should be interrupted too

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1044415 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
index 3b82874..f99a4b0 100644
--- a/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
+++ b/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Closure.java
@@ -188,9 +188,20 @@
                 {
                     pipe.start();
                 }
-                for (Pipe pipe : pipes)
+                try
                 {
-                    pipe.join();
+                    for (Pipe pipe : pipes)
+                    {
+                        pipe.join();
+                    }
+                }
+                catch (InterruptedException e)
+                {
+                    for (Pipe pipe : pipes)
+                    {
+                        pipe.interrupt();
+                    }
+                    throw e;
                 }
             }