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

This commit is contained in:
Liang Ding 2023-02-12 09:21:14 +08:00
parent 7de1aa008a
commit b120e66ca9
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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
}