You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2026/10/08 16:12:24 UTC

(tomcat) 04/22: Restore the interrupt status when SSI #exec cmd is interrupted

This is an automated email from the ASF dual-hosted git repository.

rmaucher pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 23cd4f60f67a9c8d15ddf83391b702de8f4f41d8
Author: opencode <re...@apache.org>
AuthorDate: Thu Oct 8 14:02:13 2026 +0200

    Restore the interrupt status when SSI #exec cmd is interrupted
    
    The InterruptedException thrown by Process.waitFor() in the SSI
    "#exec cmd" handler was caught, logged and reported via the
    configurable error message, but the interrupt status of the request
    thread was silently discarded. Restore it by calling
    Thread.currentThread().interrupt() in the handler so that the enclosing
    container thread can continue its shutdown processing.
---
 java/org/apache/catalina/ssi/SSIExec.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/java/org/apache/catalina/ssi/SSIExec.java b/java/org/apache/catalina/ssi/SSIExec.java
index ac71a0cb71..1c7a6c9036 100644
--- a/java/org/apache/catalina/ssi/SSIExec.java
+++ b/java/org/apache/catalina/ssi/SSIExec.java
@@ -111,6 +111,9 @@ public class SSIExec implements SSICommand {
                 }
                 lastModified = System.currentTimeMillis();
             } catch (InterruptedException e) {
+                // Restore the interrupt status so that the enclosing container
+                // thread can continue its shutdown processing
+                Thread.currentThread().interrupt();
                 ssiMediator.log(sm.getString("ssiExec.executeFailed", substitutedValue), e);
                 writer.write(configErrMsg);
             } catch (IOException ioe) {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org