From cb448fe01bbe75ef31c3190e8b63b0e1a320ffb4 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 17 Feb 2008 14:28:53 +0000 Subject: libbb: introduce and use xrename and rename_or_warn. --- sysklogd/syslogd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysklogd') 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) 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); -- cgit v1.2.3