server : add pidfile option

So we can track the pid of this process

Signed-off-by: Eric Curtin <ecurtin@redhat.com>
This commit is contained in:
Eric Curtin
2025-06-17 14:23:55 +01:00
parent 860a9e4eef
commit d3d06debe3
3 changed files with 104 additions and 12 deletions

View File

@@ -3373,5 +3373,9 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
}
).set_examples({LLAMA_EXAMPLE_SERVER}));
add_opt(common_arg({ "--pidfile" }, "FILE", "path to PID file for server process",
[](common_params & params, const std::string & value) { params.pidfile = value; })
.set_examples({ LLAMA_EXAMPLE_SERVER }));
return ctx_arg;
}

View File

@@ -366,6 +366,7 @@ struct common_params {
std::string hostname = "127.0.0.1";
std::string public_path = ""; // NOLINT
std::string chat_template = ""; // NOLINT
std::string pidfile = ""; // path to PID file for server process // NOLINT
bool use_jinja = false; // NOLINT
bool enable_chat_template = true;
common_reasoning_format reasoning_format = COMMON_REASONING_FORMAT_DEEPSEEK;