Skip to content

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

:art: 桌面端内核进程根据 Electron 主进程判断是否自动退出 Fix https://github.com/siyuan-note/siyuan/issues/7002

Liang Ding3c65021b839b
diff --git a/kernel/model/process.go b/kernel/model/process.go
index 1a94cf8968..1c3b4805d5 100644
--- a/kernel/model/process.go
+++ b/kernel/model/process.go
@@ -38,10 +38,15 @@ func HandleSignal() {
}
func HookDesktopUIProc() {
- if util.ContainerStd != util.Container || "dev" == util.Mode {
+ if util.ContainerStd != util.Container {
return
}
+ uiProcName := "siyuan"
+ if "dev" == util.Mode {
+ uiProcName = "electron"
+ }
+
time.Sleep(30 * time.Second)
existUIProc := false
for range time.Tick(7 * time.Second) {
@@ -58,7 +63,7 @@ func HookDesktopUIProc() {
return true
}
- if strings.Contains(strings.ToLower(proc.Executable()), "siyuan") {
+ if strings.Contains(strings.ToLower(proc.Executable()), uiProcName) {
existUIProc = true
return false
}