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

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

commit 347241b8fffc89e5ba27a632850c1ba358fd8432
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 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to