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

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

commit cfef05fdff8479079035e105d525f77b4974fc6d
Author: opencode <[email protected]>
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 9090ece48b..fa4e1210d6 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to