mirror of https://mirror.osredm.com/root/redis.git
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.
This commit is contained in:
parent
a7cecf3713
commit
fbdebc1d74
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue