Skip to content

fix(server): portable exit-code on subprocess-alive=false path (windows build break)#64

Merged
marksverdhei merged 1 commit into
htfrom
fix/server-models-windows-portable
Jun 4, 2026
Merged

fix(server): portable exit-code on subprocess-alive=false path (windows build break)#64
marksverdhei merged 1 commit into
htfrom
fix/server-models-windows-portable

Conversation

@marksverdhei

Copy link
Copy Markdown

Why

Every Windows build job on PRs #62 and #63 is failing with:

tools/server/server-models.cpp:923:85: error: no member named 'return_status' in 'subprocess_s'

subprocess_s::return_status is defined only in the POSIX branch of vendor/sheredom/subprocess.h:402-418. The Windows variant uses hProcess instead, so the direct field access doesn't compile.

Fix

Replace the direct field access with subprocess_join(child_proc.get(), &child_exit) — same pattern already used at line 908 of the same file. subprocess_alive() has already reaped the zombie on POSIX, so subprocess_join() returns immediately with the cached status (no risk of re-blocking on a stuck child).

- this->update_status(name, SERVER_MODEL_STATUS_UNLOADED, child_proc->return_status);
+ int child_exit = 0;
+ subprocess_join(child_proc.get(), &child_exit);
+ this->update_status(name, SERVER_MODEL_STATUS_UNLOADED, child_exit);

Impact

Verified

  • cmake -B build -DGGML_CPU=ON -DLLAMA_BUILD_APP=ON && cmake --build build --target llama-server succeeds locally.
  • ✅ Only one file touched, 1 LOC of real change.

`tools/server/server-models.cpp:923` used `child_proc->return_status`,
which is a POSIX-only field of `subprocess_s` — the Windows variant of
the struct has `hProcess` instead, so this fails to compile on every
Windows CI runner. Replace the direct field access with a portable
`subprocess_join(child_proc.get(), &child_exit)` call (same pattern
already used at line 908 of the same file). `subprocess_alive()` has
already reaped the zombie on POSIX, so `subprocess_join()` returns
immediately with the cached status.
@marksverdhei marksverdhei merged commit 190068a into ht Jun 4, 2026
3 of 8 checks passed
@marksverdhei marksverdhei deleted the fix/server-models-windows-portable branch June 4, 2026 17:00
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