From 29b4f2de09f711341a26e69143b652189c1f3a56 Mon Sep 17 00:00:00 2001 From: acgist <289547414@qq.com> Date: Mon, 13 Nov 2023 07:47:57 +0800 Subject: [PATCH] =?UTF-8?q?[*]=20=E6=97=A5=E5=B8=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/acgist/taoyao/boot/utils/ScriptUtils.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); }