From eb168ed54c72a04447f7b26cd4eb91243ba6290c Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 25 Oct 2022 01:04:51 +0800 Subject: [PATCH] =?UTF-8?q?:recycle:=20=E6=A1=8C=E9=9D=A2=E7=AB=AF?= =?UTF-8?q?=E5=86=85=E6=A0=B8=E8=BF=9B=E7=A8=8B=E4=B8=8D=E5=86=8D=E4=BB=A5?= =?UTF-8?q?=E6=B8=B8=E7=A6=BB=E6=A8=A1=E5=BC=8F=E6=8B=89=E8=B5=B7=20https:?= =?UTF-8?q?//github.com/siyuan-note/siyuan/issues/6336?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/electron/main.js | 1 + kernel/util/runtime.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/electron/main.js b/app/electron/main.js index d431f2706..4ba960405 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -544,6 +544,7 @@ const initKernel = (initData) => { const initDatas = initData.split('-') cmds.push('--workspace', initDatas[0]) cmds.push('--lang', initDatas[1]) + cmds.push("--resident", "false") cmd = `ui version [${appVer}], booting kernel [${kernelPath} --wd=${appDir} --workspace=${initDatas[0]} --lang=${initDatas[1]}]` } writeLog(cmd) diff --git a/kernel/util/runtime.go b/kernel/util/runtime.go index 93df3663c..5ac9d82af 100644 --- a/kernel/util/runtime.go +++ b/kernel/util/runtime.go @@ -47,13 +47,15 @@ func logBootInfo() { logging.LogInfof("kernel is booting:\n"+ " * ver [%s]\n"+ " * arch [%s]\n"+ + " * resident [%v]\n"+ + " * pid [%d]\n"+ " * runtime mode [%s]\n"+ " * working directory [%s]\n"+ " * read only [%v]\n"+ " * container [%s]\n"+ " * database [ver=%s]\n"+ " * workspace directory [%s, data %s]", - Ver, runtime.GOARCH, Mode, WorkingDir, ReadOnly, Container, DatabaseVer, WorkspaceDir, dataDirSize) + Ver, runtime.GOARCH, Resident, os.Getpid(), Mode, WorkingDir, ReadOnly, Container, DatabaseVer, WorkspaceDir, dataDirSize) } func IsMutexLocked(m *sync.Mutex) bool {