Sfoglia il codice sorgente

:bug: 桌面端系统睡眠唤醒后内核可能会自动退出 Fix https://github.com/siyuan-note/siyuan/issues/7323

Liang Ding 2 anni fa
parent
commit
7de1aa008a
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      kernel/model/process.go

+ 4 - 0
kernel/model/process.go

@@ -121,6 +121,10 @@ func getAttachedUIProcCount() (ret int) {
 func getUIProcCount() (ret int) {
 	procs, _ := goPS.Processes()
 	for _, proc := range procs {
+		if proc.Pid() == os.Getpid() {
+			continue
+		}
+
 		procName := strings.ToLower(proc.Executable())
 		uiProcOk := false
 		for _, name := range uiProcNames {