Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
Remove early cleanup in server
Justine Tunney59a5d97929b9
diff --git a/llamafile/server/client.cpp b/llamafile/server/client.cppindex 2f6e2e52..ed622c2d 100644--- a/llamafile/server/client.cpp+++ b/llamafile/server/client.cpp@@ -382,7 +382,6 @@ Client::append_http_response_message(char* p, int code, const char* reason)boolClient::send_response(char* p0, char* p, std::string_view content){- cleanup();pthread_testcancel();should_send_error_if_canceled_ = false;diff --git a/llamafile/server/main.cpp b/llamafile/server/main.cppindex 4f0ad4e2..7274fb49 100644--- a/llamafile/server/main.cpp+++ b/llamafile/server/main.cpp@@ -107,6 +107,12 @@ main(int argc, char* argv[])// install securityif (!FLAG_unsecure) {+ const char* promises;+ if (FLAG_www_root) {+ promises = "stdio anet rpath";+ } else {+ promises = "stdio anet";+ }if (pledge(0, 0)) {SLOG("warning: this OS doesn't support pledge() security");} else if (pledge("stdio anet", 0)) {