mirror of
https://github.com/redis/redis.git
synced 2026-06-11 01:40:25 -04:00
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
1 changed files with 2 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue