aboutsummaryrefslogtreecommitdiffstats
path: root/src/coopgammad.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coopgammad.c')
-rw-r--r--src/coopgammad.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coopgammad.c b/src/coopgammad.c
index 5f18814..83352e0 100644
--- a/src/coopgammad.c
+++ b/src/coopgammad.c
@@ -604,7 +604,7 @@ static char* reexecute(void)
goto fail;
}
- fd = open(statefile, O_CREAT, S_IRUSR | S_IWUSR);
+ fd = open(statefile, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR);
if (fd < 0)
goto fail;