mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🐛 桌面端系统睡眠唤醒后内核可能会自动退出 Fix https://github.com/siyuan-note/siyuan/issues/7323
This commit is contained in:
parent
7de1aa008a
commit
b120e66ca9
1 changed files with 2 additions and 1 deletions
|
|
@ -119,9 +119,10 @@ func getAttachedUIProcCount() (ret int) {
|
||||||
|
|
||||||
// getUIProcCount 获取 UI 进程数。
|
// getUIProcCount 获取 UI 进程数。
|
||||||
func getUIProcCount() (ret int) {
|
func getUIProcCount() (ret int) {
|
||||||
|
pid := os.Getpid()
|
||||||
procs, _ := goPS.Processes()
|
procs, _ := goPS.Processes()
|
||||||
for _, proc := range procs {
|
for _, proc := range procs {
|
||||||
if proc.Pid() == os.Getpid() {
|
if proc.Pid() == pid {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue