Add log message when PID file fails to create
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.
@@ -6171,6 +6171,8 @@ void createPidFile(void) {
if (fp) {
fprintf(fp,"%d\n",(int)getpid());
fclose(fp);
+ } else {
+ serverLog(LL_WARNING, "Failed to write PID file: %s", strerror(errno));
}
}
