tidying/hardening

This commit is contained in:
Eric 2024-03-14 14:37:02 -07:00
parent 68f0619c4e
commit ff6492e19e
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
2 changed files with 8 additions and 5 deletions

View File

@ -151,7 +151,7 @@ meta-clean:
# few things such as localconfig.json). # few things such as localconfig.json).
clean: clean:
$(CHECK_CLEAN_SAFETY) $(CHECK_CLEAN_SAFETY)
rm -rf build # Handle this part ourself; can confuse git. rm -rf build # Kill build ourself; may confuse git if contains other repos.
git clean -dfx $(ROOT_CLEAN_IGNORES) git clean -dfx $(ROOT_CLEAN_IGNORES)
# Show what clean would delete without actually deleting it. # Show what clean would delete without actually deleting it.

View File

@ -165,11 +165,14 @@ int get_running_server_port_(const struct Context_* ctx,
cJSON* state_dict = cJSON_Parse(buf); cJSON* state_dict = cJSON_Parse(buf);
if (!state_dict) { if (!state_dict) {
// An un-parseable state file is not a recoverable error; go down hard.
fprintf(stderr, fprintf(stderr,
"Error: pcommandbatch client %s_%d (pid %d): failed to parse state " "Fatal Error: pcommandbatch client %s_%d (pid %d):"
"value.\n", " failed to parse state file value of size %zu.\n",
ctx->instance_prefix, ctx->instance_num, ctx->pid); ctx->instance_prefix, ctx->instance_num, ctx->pid, amt);
return -1; fflush(stderr);
abort();
// return -1;
} }
// If results included output, print it. // If results included output, print it.