fix: cross-compile compat for codedb nuke#175
Conversation
Generated with AI Co-Authored-By: AI <ai@example.com>
Benchmark Regression ReportThreshold: 10.00%
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3be9b4e752
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| // Kill other running codedb processes (exclude ourselves) | ||
| const my_pid = std.c.getpid(); | ||
| const my_pid = std.Thread.getCurrentId(); |
There was a problem hiding this comment.
Compare kill list against a process ID
pgrep returns process IDs, but std.Thread.getCurrentId() returns a thread identifier, which is a different namespace on several targets (notably Darwin/Windows). That means the self-filter check later in this block is no longer reliable and can skip the wrong process or fail to exclude the current process when it is matched, causing nuke to terminate unexpectedly before cleanup completes. This should use a PID API instead of a thread ID.
Useful? React with 👍 / 👎.
Replace std.c.getpid() with std.Thread.getCurrentId() so nuke command works on Linux cross-compile without libc dependency.