🐛 macOS 端报错 数据库被锁定 Fix https://github.com/siyuan-note/siyuan/issues/6492

This commit is contained in:
Liang Ding 2022-11-07 23:21:00 +08:00
parent 28711c7b2a
commit 8c7fce8cf2
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -50,8 +50,12 @@ func killRunningKernel() {
return
}
currentPid := os.Getpid()
killed := false
for _, process := range processes {
if process.Pid() == currentPid {
continue
}
procName := strings.ToLower(process.Executable())
if strings.Contains(procName, "siyuan-kernel") {
kill(fmt.Sprintf("%d", process.Pid()))