summaryrefslogtreecommitdiff
path: root/report.c
diff options
context:
space:
mode:
authorRobert Swiecki <robert@swiecki.net>2019-04-17 22:02:53 +0200
committerRobert Swiecki <robert@swiecki.net>2019-04-17 22:02:53 +0200
commitaf7a92b9a644d1cc75b415351d9cb2a52eadefcf (patch)
treefe5854729e0a4524df7242d2a94106ff91f863f6 /report.c
parent251ee7cf631b31ef92b2426f84e6a44da1748fc8 (diff)
downloadhonggfuzz-af7a92b9a644d1cc75b415351d9cb2a52eadefcf.tar.gz
subproc: use TEMP_FAILURE_RETRY with some restartable funcs
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);
}