Skip to content

fix: cross-compile compat for codedb nuke#175

Merged
justrach merged 1 commit intomainfrom
fix/cross-compile-nuke
Apr 6, 2026
Merged

fix: cross-compile compat for codedb nuke#175
justrach merged 1 commit intomainfrom
fix/cross-compile-nuke

Conversation

@justrach
Copy link
Copy Markdown
Owner

@justrach justrach commented Apr 6, 2026

Replace std.c.getpid() with std.Thread.getCurrentId() so nuke command works on Linux cross-compile without libc dependency.

Generated with AI

Co-Authored-By: AI <ai@example.com>
@justrach justrach merged commit b8c68af into main Apr 6, 2026
1 check passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Benchmark Regression Report

Threshold: 10.00%

Tool Base (ns) Head (ns) Delta Status
codedb_bundle 643726 648009 +0.67% OK
codedb_changes 107167 108538 +1.28% OK
codedb_deps 32784 29598 -9.72% OK
codedb_edit 19348 19682 +1.73% OK
codedb_find 137733 149609 +8.62% OK
codedb_hot 170182 161082 -5.35% OK
codedb_outline 448176 429216 -4.23% OK
codedb_read 169699 167727 -1.16% OK
codedb_search 260240 257737 -0.96% OK
codedb_snapshot 3771055 3724749 -1.23% OK
codedb_status 28030 27958 -0.26% OK
codedb_symbol 65133 65102 -0.05% OK
codedb_tree 140878 138906 -1.40% OK
codedb_word 91842 89820 -2.20% OK

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/main.zig

// Kill other running codedb processes (exclude ourselves)
const my_pid = std.c.getpid();
const my_pid = std.Thread.getCurrentId();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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