fix: keep Type=forking behavior in dde-session-daemon-loader-wrapper - #1230
Conversation
The systemd service was changed to `Type=forking` in linuxdeepin@ee600cd, but linuxdeepin@1f4a441 changed the wrapper back to directly exec the original daemon, which hangs the systemd service indefinitely on Arch since we don't have deepin-security-loader. Let's revert to the fork-like behavior to fix this.
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe wrapper is adjusted to fork the original daemon instead of directly replacing the wrapper process, preventing the File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 良好 ✅ 通过 潜在问题: 建议: 1. 确认 security-loader 路径是否需要同步修改为 fork 行为 2. 如 deepin-security-loader 自身处理 fork,可添加注释说明 2. 代码质量 ✅评价: 良好 ✅ 通过 潜在问题: 建议: 1. 添加 $REAL_BINARY 存在性检查 2. 添加 exit 0 行为注释 3. 考虑对启动失败进行日志记录 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 无性能问题,将 exec 改为后台执行+exit 对性能无负面影响 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 无安全漏洞,代码不涉及用户输入处理、网络通信等安全敏感操作 💡 改进建议代码示例# 建议改进版本
logger -t dde-session-daemon "starting directly"
if [ -x "$REAL_BINARY" ]; then
"$REAL_BINARY" "$@" &
# exit 0 for systemd Type=forking - parent should exit after forking
exit 0
else
logger -t dde-session-daemon "error: $REAL_BINARY not found or not executable"
exit 1
fi本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: felixonmars, fly602 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
The systemd service was changed to
Type=forkingin ee600cd, but 1f4a441 changed the wrapper back to directly exec the original daemon, which hangs the systemd service indefinitely on Arch since we don't have deepin-security-loader.Let's revert to the fork-like behavior to fix this.
Summary by Sourcery
Bug Fixes: