diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-05 01:10:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-05 01:10:03 +0000 |
commit | 49b78fc1a8f1591fa172399b3be1dba4b7f23554 (patch) | |
tree | f34271a9e766725cb6ce59c35cc98d91ddf137ac /sysklogd | |
parent | a3087ca7495e33b19b122869d17defeb9c933d19 (diff) | |
download | busybox-w32-1_10_3.tar.gz busybox-w32-1_10_3.tar.bz2 busybox-w32-1_10_3.zip |
Apply post-1.10.2 fixes, bump version to 1.10.31_10_3
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/syslogd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 371b5588f..5f3ac2c2f 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -347,10 +347,11 @@ static void log_locally(time_t now, char *msg) | |||
347 | sprintf(newFile, "%s.%d", G.logFilePath, i); | 347 | sprintf(newFile, "%s.%d", G.logFilePath, i); |
348 | if (i == 0) break; | 348 | if (i == 0) break; |
349 | sprintf(oldFile, "%s.%d", G.logFilePath, --i); | 349 | sprintf(oldFile, "%s.%d", G.logFilePath, --i); |
350 | xrename(oldFile, newFile); | 350 | /* ignore errors - file might be missing */ |
351 | rename(oldFile, newFile); | ||
351 | } | 352 | } |
352 | /* newFile == "f.0" now */ | 353 | /* newFile == "f.0" now */ |
353 | xrename(G.logFilePath, newFile); | 354 | rename(G.logFilePath, newFile); |
354 | fl.l_type = F_UNLCK; | 355 | fl.l_type = F_UNLCK; |
355 | fcntl(G.logFD, F_SETLKW, &fl); | 356 | fcntl(G.logFD, F_SETLKW, &fl); |
356 | close(G.logFD); | 357 | close(G.logFD); |