[*] 日常优化
This commit is contained in:
@@ -184,11 +184,14 @@ public final class ScriptUtils {
|
|||||||
if(this.process.isAlive()) {
|
if(this.process.isAlive()) {
|
||||||
log.info("强制结束命令:{}", this.script);
|
log.info("强制结束命令:{}", this.script);
|
||||||
// 所有子进程
|
// 所有子进程
|
||||||
this.process.children().forEach(process -> {
|
this.process.children().forEach(ProcessHandle::destroy);
|
||||||
process.destroy();
|
// this.process.children().forEach(ProcessHandle::destroyForcibly);
|
||||||
});
|
// 所有派生进程
|
||||||
|
// this.process.descendants().forEach(ProcessHandle::destroy);
|
||||||
|
// this.process.descendants().forEach(ProcessHandle::destroyForcibly);
|
||||||
// 当前父进程
|
// 当前父进程
|
||||||
this.process.destroy();
|
this.process.destroy();
|
||||||
|
// this.process.destroyForcibly();
|
||||||
} else {
|
} else {
|
||||||
log.debug("正常结束命令:{}", this.script);
|
log.debug("正常结束命令:{}", this.script);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user