Skip to content

Conversation

pvaret
Copy link

@pvaret pvaret commented Sep 14, 2025

This PR adds a command line flag to llama-server, --systemd, that makes it:

  • use the socket passed by systemd, if any, instead of opening a new one on the given host and port;
  • report readiness to serve queries using the systemd notification API.

This allows running llama-server as a systemd service, with on-demand activation, and reliable readiness reporting.

This PR makes use of macros to ensure that the systemd-related code is only built if the build is configured with -DLLAMA_SERVER_SYSTEMD=ON.

Per CONTRIBUTING.md, the modified files were formatted with clang-format. The formatting was applied in a distinct commit for easier reviewing.

@pvaret pvaret requested a review from ngxson as a code owner September 14, 2025 21:42
@github-actions github-actions bot added build Compilation issues examples server labels Sep 14, 2025
@xuanson2025
Copy link

Please revert the formatting commit. Any formatting that affect the whole file should be done in a dedicated PR.

@pvaret
Copy link
Author

pvaret commented Sep 15, 2025

Sure -- done! Thanks for the advice. Should I re-submit the formatting commit as a separate PR, or is that just not considered very valuable?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Compilation issues examples server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants