Unverified Commit fbdebc1d authored by Madelyn Olson's avatar Madelyn Olson Committed by GitHub
Browse files

Add log message when PID file fails to create (#11544)

Add an error message when PID file fails to be written. This has historically been considered a best effort failure, but we don't even report the failure.
parent a7cecf37
...@@ -6171,6 +6171,8 @@ void createPidFile(void) { ...@@ -6171,6 +6171,8 @@ void createPidFile(void) {
if (fp) { if (fp) {
fprintf(fp,"%d\n",(int)getpid()); fprintf(fp,"%d\n",(int)getpid());
fclose(fp); fclose(fp);
} else {
serverLog(LL_WARNING, "Failed to write PID file: %s", strerror(errno));
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment