[
https://issues.apache.org/jira/browse/EXEC-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14072472#comment-14072472
]
Michael Vorburger commented on EXEC-69:
---------------------------------------
Hello! I've just hit this problem as well... :-( +1 for fixing this, and
releasing a commons-exec 1.3! Background of context I ran into this is in
https://github.com/vorburger/MariaDB4j/issues/12, in case anyone is interested
(part of my https://github.com/vorburger/MariaDB4j mySQL embedder - shameless
plug).
Also note how in
https://github.com/vorburger/MariaDB4j/blob/c05ec7650afee823f505a530c75945f7e008c54e/src/main/java/ch/vorburger/exec/BetterExecutor.java
I've used Thread t = super.createThread(runnable, name); instead of new
Thread(runnable, name); as in attached DaemonExecutor.java (thank you
[~richarda]!) - just in the (unlikely, yes) case that a newer commons-exec does
anything else in there (like set a more suitable Thread name, perhaps?).
> DefaultExecutor async execute prevents shutdown hooks running
> -------------------------------------------------------------
>
> Key: EXEC-69
> URL: https://issues.apache.org/jira/browse/EXEC-69
> Project: Commons Exec
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: Richard Atkins
> Attachments: DaemonExecutor.java
>
>
> The DefaultExecutor asynchronous execute methods create a user-level thread
> to monitor the process it starts. This prevents shutdown hooks - like the one
> in ShutdownHookProcessDestroyer - from running. This makes these two classes
> incompatible.
--
This message was sent by Atlassian JIRA
(v6.2#6252)