mirror of
https://github.com/alibaba/arthas.git
synced 2026-10-20 00:17:01 +00:00
interrupt时如果处于TERMINATED也应该成功 (#3079)
触发条件: HttpApiHandler的processExecRequest在job的状态是TERMINATED时会退出waitForJob,sessionManager.removeSession时会判断是否有foregroundJob, 如果存在则调用interrupt, 修改process的状态和把foregroundJob置空在另一个线程,并且是先设置状态为TERMINATED然后才会把foregroundJob置空,存在时间差
This commit is contained in:
@@ -140,7 +140,7 @@ public class ProcessImpl implements Process {
|
||||
|
||||
@Override
|
||||
public boolean interrupt(final Handler<Void> completionHandler) {
|
||||
if (processStatus == ExecStatus.RUNNING || processStatus == ExecStatus.STOPPED) {
|
||||
if (processStatus == ExecStatus.RUNNING || processStatus == ExecStatus.STOPPED || processStatus == ExecStatus.TERMINATED) {
|
||||
final Handler<Void> handler = interruptHandler;
|
||||
try {
|
||||
if (handler != null) {
|
||||
|
||||
Reference in New Issue
Block a user