Skip to content

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

:art: Buffer signal channel passed to signal.Notify

Daniel0e925fe5020b
diff --git a/kernel/model/process.go b/kernel/model/process.go
index 297e02d032..079c72ba0f 100644
--- a/kernel/model/process.go
+++ b/kernel/model/process.go
@@ -30,7 +30,7 @@ import (
)
func HandleSignal() {
- c := make(chan os.Signal)
+ c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM)
s := <-c
logging.LogInfof("received os signal [%s], exit kernel process now", s)