projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd23fbb
)
syslogd: do not error out on missing files to rotate. closes bug 3404.
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 24 May 2008 21:03:53 +0000
(21:03 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 24 May 2008 21:03:53 +0000
(21:03 -0000)
sysklogd/syslogd.c
patch
|
blob
|
history
diff --git
a/sysklogd/syslogd.c
b/sysklogd/syslogd.c
index f8fc5178056328480f6508ab53e9466884d6c793..1b8d718f471bceea43959bd43689ea65a35947e7 100644
(file)
--- a/
sysklogd/syslogd.c
+++ b/
sysklogd/syslogd.c
@@
-347,10
+347,11
@@
static void log_locally(time_t now, char *msg)
sprintf(newFile, "%s.%d", G.logFilePath, i);
if (i == 0) break;
sprintf(oldFile, "%s.%d", G.logFilePath, --i);
- xrename(oldFile, newFile);
+ /* ignore errors - file might be missing */
+ rename(oldFile, newFile);
}
/* newFile == "f.0" now */
-
x
rename(G.logFilePath, newFile);
+ rename(G.logFilePath, newFile);
fl.l_type = F_UNLCK;
fcntl(G.logFD, F_SETLKW, &fl);
close(G.logFD);