diff options
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/syslogd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index c6e057138..dc5e6250a 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -344,10 +344,10 @@ static void log_locally(time_t now, char *msg) | |||
344 | sprintf(newFile, "%s.%d", G.logFilePath, i); | 344 | sprintf(newFile, "%s.%d", G.logFilePath, i); |
345 | if (i == 0) break; | 345 | if (i == 0) break; |
346 | sprintf(oldFile, "%s.%d", G.logFilePath, --i); | 346 | sprintf(oldFile, "%s.%d", G.logFilePath, --i); |
347 | rename(oldFile, newFile); | 347 | xrename(oldFile, newFile); |
348 | } | 348 | } |
349 | /* newFile == "f.0" now */ | 349 | /* newFile == "f.0" now */ |
350 | rename(G.logFilePath, newFile); | 350 | xrename(G.logFilePath, newFile); |
351 | fl.l_type = F_UNLCK; | 351 | fl.l_type = F_UNLCK; |
352 | fcntl(G.logFD, F_SETLKW, &fl); | 352 | fcntl(G.logFD, F_SETLKW, &fl); |
353 | close(G.logFD); | 353 | close(G.logFD); |