diff options
author | Mattias Andrée <maandree@kth.se> | 2016-08-05 12:53:37 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-08-05 12:53:37 +0200 |
commit | bcc3f0b534c895deb1cbd28309f8c2dc6972a91f (patch) | |
tree | b98bd71edc77968a4385ce0ef51ad78abaa41287 /src/coopgammad.c | |
parent | In case re-exec fails (diff) | |
download | coopgammad-bcc3f0b534c895deb1cbd28309f8c2dc6972a91f.tar.gz coopgammad-bcc3f0b534c895deb1cbd28309f8c2dc6972a91f.tar.bz2 coopgammad-bcc3f0b534c895deb1cbd28309f8c2dc6972a91f.tar.xz |
Fix reexec bug
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/coopgammad.c')
-rw-r--r-- | src/coopgammad.c | 2 |
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; |