From b120e66ca976399f8b110a326e96e1e9f2bcf203 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 12 Feb 2023 09:21:14 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E7=9D=A1=E7=9C=A0=E5=94=A4=E9=86=92=E5=90=8E=E5=86=85?= =?UTF-8?q?=E6=A0=B8=E5=8F=AF=E8=83=BD=E4=BC=9A=E8=87=AA=E5=8A=A8=E9=80=80?= =?UTF-8?q?=E5=87=BA=20Fix=20https://github.com/siyuan-note/siyuan/issues/?= =?UTF-8?q?7323?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/process.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/model/process.go b/kernel/model/process.go index f69ec6c85..05e9397ca 100644 --- a/kernel/model/process.go +++ b/kernel/model/process.go @@ -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 }