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 Dingb120e66ca976
diff --git a/kernel/model/process.go b/kernel/model/process.go
index f69ec6c85d..05e9397ca6 100644
--- a/kernel/model/process.go
+++ b/kernel/model/process.go
@@ -119,9 +119,10 @@ func getAttachedUIProcCount() (ret int) {
// getUIProcCount 获取 UI 进程数。
func getUIProcCount() (ret int) {
+ pid := os.Getpid()
procs, _ := goPS.Processes()
for _, proc := range procs {
- if proc.Pid() == os.Getpid() {
+ if proc.Pid() == pid {
continue
}