diff --git a/taoyao-signal-server/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/ScriptUtils.java b/taoyao-signal-server/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/ScriptUtils.java index 2f70de5..03a8fb9 100644 --- a/taoyao-signal-server/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/ScriptUtils.java +++ b/taoyao-signal-server/taoyao-boot/src/main/java/com/acgist/taoyao/boot/utils/ScriptUtils.java @@ -184,11 +184,14 @@ public final class ScriptUtils { if(this.process.isAlive()) { log.info("强制结束命令:{}", this.script); // 所有子进程 - this.process.children().forEach(process -> { - process.destroy(); - }); + this.process.children().forEach(ProcessHandle::destroy); +// this.process.children().forEach(ProcessHandle::destroyForcibly); + // 所有派生进程 +// this.process.descendants().forEach(ProcessHandle::destroy); +// this.process.descendants().forEach(ProcessHandle::destroyForcibly); // 当前父进程 this.process.destroy(); +// this.process.destroyForcibly(); } else { log.debug("正常结束命令:{}", this.script); }