Skip to content

Commit

Permalink
Remove early cleanup in server
Browse files Browse the repository at this point in the history
  • Loading branch information
jart committed Dec 10, 2024
1 parent 9b03e32 commit 59a5d97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion llamafile/server/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ Client::append_http_response_message(char* p, int code, const char* reason)
bool
Client::send_response(char* p0, char* p, std::string_view content)
{
cleanup();
pthread_testcancel();
should_send_error_if_canceled_ = false;

Expand Down
6 changes: 6 additions & 0 deletions llamafile/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ main(int argc, char* argv[])

// install security
if (!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)) {
Expand Down

0 comments on commit 59a5d97

Please sign in to comment.