Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

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

Liang Dingd316e4abc303
diff --git a/kernel/model/process.go b/kernel/model/process.go
index ba8bd70d9c..5e217740f7 100644
--- a/kernel/model/process.go
+++ b/kernel/model/process.go
@@ -105,7 +105,9 @@ func getAttachedUIProcCount() (ret int) {
procName := strings.ToLower(proc.Executable())
uiProcOk := false
for _, name := range uiProcNames {
- uiProcOk = strings.Contains(procName, name)
+ if uiProcOk = strings.Contains(procName, name); uiProcOk {
+ break
+ }
}
if uiProcOk {
ret++
@@ -122,7 +124,9 @@ func getUIProcCount() (ret int) {
procName := strings.ToLower(proc.Executable())
uiProcOk := false
for _, name := range uiProcNames {
- uiProcOk = strings.Contains(procName, name)
+ if uiProcOk = strings.Contains(procName, name); uiProcOk {
+ break
+ }
}
if uiProcOk {
ret++