maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Klochkov (JIRA)" <>
Subject [jira] (MSHARED-295) Non reliable killing of processes by CommandLineUtils
Date Tue, 10 Sep 2013 23:09:52 GMT


Andrey Klochkov updated MSHARED-295:

    Attachment: MSHARED-295.patch

Attaching a patch. The idea is to use Sigar (
as an optional dependency. It's JNI based library with Apache license. If Sigar classes are
present, use it to walk over child processes and kill them all. Otherwise the default implementation
is used. The patch is not finished - in particular, determining PID would not work on Windows.
What about the idea? The code itself is verified with Hadoop builds which tend to have the
problem of non killed subprocesses. Checked on OSX and Linux.
> Non reliable killing of processes by CommandLineUtils
> -----------------------------------------------------
>                 Key: MSHARED-295
>                 URL:
>             Project: Maven Shared Components
>          Issue Type: Improvement
>          Components: maven-shared-utils
>            Reporter: Andrey Klochkov
>         Attachments: MSHARED-295.patch
> CommandLineUtils is used in Maven-Surefire to start forks which execute tests. It is
a well known issue that sometimes child processes are not killed correctly. This is a known
limitation of JVM, and the only reliable way to implement it would be platform specific.
> Bug report in Surefire JIRA:
> JVM bug report. It's Windows specific, but the problem exists on Linux and OSX as well.
> I'm proposing either 1) to implement several platform specific implementations of ProcessHook
or 2) to make the mechanism of killing processes extendable for clients of the library.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message