Browse Source

:art: 改进桌面端监控前端界面进程退出钩子

Liang Ding 2 years ago
parent
commit
4c6b61cc37
1 changed files with 6 additions and 3 deletions
  1. 6 3
      kernel/model/process.go

+ 6 - 3
kernel/model/process.go

@@ -86,8 +86,11 @@ func HookDesktopUIProcJob() {
 		return true
 	})
 
-	if 1 < noUIProcCount {
-		logging.LogInfof("no active UI proc, exit kernel process now")
-		Close(false, 1)
+	if 0 < noUIProcCount {
+		logging.LogInfof("no active UI proc count [%d]", noUIProcCount)
+		if 1 < noUIProcCount {
+			logging.LogInfof("confirmed no active UI proc, exit kernel process now")
+			Close(false, 1)
+		}
 	}
 }