mirror of
https://github.com/apache/maven-mvnd.git
synced 2026-01-13 07:04:14 +08:00
Kill children processes when interrupting the build, fixes #343
This commit is contained in:
@@ -389,6 +389,11 @@ public class Server implements AutoCloseable, Runnable {
|
||||
final SmartBuilder builder = SmartBuilder.cancel();
|
||||
stateLock.lock();
|
||||
try {
|
||||
try {
|
||||
ProcessHandle.current().descendants().forEach(ProcessHandle::destroy);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
long rem;
|
||||
while ((rem = time - System.currentTimeMillis()) > 0) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user