Skip to content

[rqd] Fix rqd recovery mode - #2503

Draft
DiegoTavares wants to merge 1 commit into
AcademySoftwareFoundation:masterfrom
DiegoTavares:rqd_recover
Draft

[rqd] Fix rqd recovery mode#2503
DiegoTavares wants to merge 1 commit into
AcademySoftwareFoundation:masterfrom
DiegoTavares:rqd_recover

Conversation

@DiegoTavares

Copy link
Copy Markdown
Collaborator

Recover mode was never working properly on Linux as when running as under systemctl service, spawned frames were being killed with the rqd process for both belong to the same cgroup.

This change not only changes the .service default KillMode=control-group to KillMode=process but also fixes a bug on the frames hardness:

  • frame_cmd.rs — enabled the exit-file harness on Linux and rewrote the wrapper script, which had real bugs: command_pid=$! was captured after a foreground eval (so it was always empty), the trap wrote the raw signal number as the exit code, and bash defers traps while a foreground child runs (kills couldn't be forwarded). The new script runs the command in the background + wait, forwards signals, re-waits until the command truly exits, and writes the exit file atomically (tmp + mv).

LLM usage disclosure

Claude Opus was used to execute the changes on this PR.

Recover mode was never working properly on Linux as when running as under systemctl service, spawned
frames were being killed with the rqd process for both belong to the same cgroup.

This change not only changes the .service default `KillMode=control-group` to `KillMode=process` but
also fixes a bug on the frames hardness:

- frame_cmd.rs — enabled the exit-file harness on Linux and rewrote the wrapper script, which had
  real bugs: command_pid=$! was captured after a foreground eval (so it was always empty), the trap
  wrote the raw signal number as the exit code, and bash defers traps while a foreground child runs
  (kills couldn't be forwarded). The new script runs the command in the background + wait, forwards
  signals, re-waits until the command truly exits, and writes the exit file atomically (tmp + mv).
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bfabf39-347e-42fc-b7b4-a36bfe0becda

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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