diff options
author | Denis Vlasenko | 2008-02-17 14:28:53 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-02-17 14:28:53 +0000 |
commit | cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4 (patch) | |
tree | 9757477193c1b8f3be9a772cabfb1ef92639240e /sysklogd | |
parent | ffae845cfd0a0b9872827d806984841d4cfee104 (diff) | |
download | busybox-cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4.zip busybox-cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4.tar.gz |
libbb: introduce and use xrename and rename_or_warn.
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 c6e0571..dc5e625 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -344,10 +344,10 @@ 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); - rename(oldFile, newFile); + xrename(oldFile, newFile); } /* newFile == "f.0" now */ - rename(G.logFilePath, newFile); + xrename(G.logFilePath, newFile); fl.l_type = F_UNLCK; fcntl(G.logFD, F_SETLKW, &fl); close(G.logFD); |