slachiewicz opened a new issue, #79:
URL: https://github.com/apache/maven-executor/issues/79

   ### Affected version
   
   1.0.0, `main` at ae2fe0e
   
   ### Bug description
   
   `ProcessBuilderExecutorSupport.doExecuteProcess` catches 
`InterruptedException`, destroys the process and throws `ExecutorException` 
without calling `Thread.currentThread().interrupt()` 
([`ProcessBuilderExecutorSupport.java:114-117`](https://github.com/apache/maven-executor/blob/main/maven-executor/src/main/java/org/apache/maven/executor/support/ProcessBuilderExecutorSupport.java#L114-L117)).
 Catching `InterruptedException` clears the flag, so code above the executor (a 
test framework's timeout, an executor service shutting down) no longer sees 
that the thread was interrupted.
   
   Reproduction: interrupt the calling thread, then run `-B validate` through 
`ForkedMavenExecutor`. On Maven 3.9.16 and 4.0.0-rc-7 the call throws 
`ExecutorException: Interrupted while executing command`, and 
`Thread.currentThread().isInterrupted()` is `false` afterwards.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to