{
if (ctx->logfile) {
- int f = O_CREAT | O_APPEND;
+ int f = O_CREAT | O_APPEND | O_TRUNC;
#ifdef O_CLOEXEC
f |= O_CLOEXEC;
#define CONFIG_H
#define PACKAGE "dhcpcd"
-#define VERSION "6.7.99.5"
+#define VERSION "6.7.99.6"
#ifndef CONFIG
# define CONFIG SYSCONFDIR "/" PACKAGE ".conf"
.Xr syslog 3 .
The
.Ar logfile
-is reopened when
+is truncated when opened and is reopened when
.Nm
receives the
.Dv SIGUSR2
.Xr syslog 3 .
The
.Ar logfile
-is reopened when
+is truncated when opened and is reopened when
.Nm dhcpcd
receives the
.Dv SIGUSR2