diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-12-13 11:09:10 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2013-12-13 11:09:10 +0100 |
commit | 8916da62a752e2c3658b9c9d1ed3fc5a67c4501d (patch) | |
tree | e7b580439c81ab33f47944aa32428f9f4e525ea0 /hugin.c | |
parent | 312de68e259fe03d6df09f7c7f0f7271c2350532 (diff) |
Open log file in append mode.20131213-320131213-2
Diffstat (limited to 'hugin.c')
-rw-r--r-- | hugin.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -230,7 +230,8 @@ hug_status_t hug_init(unsigned int flags, ...) case HUG_OPTION_FILENAME: if(hug_config.flags & HUG_FLAG_OUTPUT_TO_FILE) { hug_config.filename = strdup((const char*)va_arg(vl, char*)); - hug_config.file_fd = open(hug_config.filename, O_CREAT | O_RDWR, 0777); + hug_config.file_fd = open(hug_config.filename, + O_CREAT | O_APPEND | O_RDWR, 0777); if(hug_config.file_fd == -1) { fprintf(stderr, "Could not open logfile for writing: %s\n", hug_config.filename); @@ -291,7 +292,8 @@ hug_status_t hugin_reopen_log() if((hug_config.flags & HUG_FLAG_OUTPUT_TO_FILE) == 0) return HUG_STATUS_OK; close(hug_config.file_fd); - hug_config.file_fd = open(hug_config.filename, O_CREAT | O_RDWR, 0777); + hug_config.file_fd = open(hug_config.filename, + O_CREAT | O_APPEND | O_RDWR, 0777); if(hug_config.file_fd == -1) { fprintf(stderr, "Could not re-open logfile for writing: %s\n", |