Skip to content

Improve process status check with error handling for psutil#445

Open
saltapp wants to merge 1 commit into
lsdefine:mainfrom
saltapp:dev/cli_fix
Open

Improve process status check with error handling for psutil#445
saltapp wants to merge 1 commit into
lsdefine:mainfrom
saltapp:dev/cli_fix

Conversation

@saltapp
Copy link
Copy Markdown

@saltapp saltapp commented May 20, 2026

修复 ga status 在进程枚举受限环境下直接崩溃的问题。

变更内容

为 cmd_status() 增加 psutil 导入失败兜底提示。
捕获系统拒绝枚举进程时的 PermissionError / psutil.Error,避免 traceback。
遍历进程时跳过无权限读取的单个进程,继续检查其他进程。
保留原有状态输出格式。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant