summaryrefslogtreecommitdiff
path: root/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'report.c')
-rw-r--r--report.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/report.c b/report.c
index d50b061f..034a1868 100644
--- a/report.c
+++ b/report.c
@@ -23,6 +23,7 @@
#include "report.h"
+#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <stdio.h>
@@ -79,7 +80,8 @@ void report_Report(run_t* run) {
snprintf(reportFName, sizeof(reportFName), "%s", run->global->cfg.reportFile);
}
- reportFD = open(reportFName, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644);
+ reportFD =
+ TEMP_FAILURE_RETRY(open(reportFName, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644));
if (reportFD == -1) {
PLOG_F("Couldn't open('%s') for writing", reportFName);
}