fix(process): skip wait/exit_code when prep-cmd fails with permission_denied in desktop mode#680
Conversation
…_denied in desktop mode When running in desktop mode (app.cmd is empty) and a prep-cmd fails with permission_denied (e.g., Session 0 isolation when screen is locked), the existing code already skips the run_command error. However, the subsequent child.wait() also returns permission_denied, which was NOT covered by the exception and caused execute() to return -1, triggering fail_guard to destroy the VDD and break streaming. This fix adds a skip_prep_failure flag that, when set, also skips the wait() and exit_code() checks, allowing the streaming session to continue normally even when prep-cmds fail due to locked screen.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (1)src/**/*.{cpp,c,h}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (1)
Summary by CodeRabbit发布说明
总览
变更预启动命令权限异常处理
预期审查工作量🎯 3 (中等) | ⏱️ ~20 分钟 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4db4aa3 to
e5579b9
Compare
Summary
permission_deniedexception handling inproc_t::execute()prep-cmd loopapp.cmdis empty) and a prep-cmd fails withpermission_denied(e.g., Session 0 isolation when screen is locked), the existing code already skips therun_commanderror. However, the subsequentchild.wait()also returnspermission_denied, which was not covered by the exception and causedexecute()to return-1, triggeringfail_guardto destroy the VDD and break streaming.Root Cause
In the original code:
Fix
Add a
skip_prep_failureflag that, when set, also skips thewait()andexit_code()checks:Testing
Couldn't run [.\tools\SetDpi.exe 175]: System: permission_deniedfollowed by successful[Desktop]executionFiles Changed
src/process.cpp—proc_t::execute()prep-cmd loop only