aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-05-17 01:36:03 +0200
committervan Hauser <vh@thc.org>2020-05-17 01:36:03 +0200
commitd37a8f72d6d4d92df73a318ad02046adbc6dba29 (patch)
tree020c8d105972c0e17e88d28992290a01e4843a58 /src
parent9dd3e3e38a6f9643a4850099ca7e0112e5e94f14 (diff)
downloadafl++-d37a8f72d6d4d92df73a318ad02046adbc6dba29.tar.gz
fix master creation file
Diffstat (limited to 'src')
-rw-r--r--src/afl-fuzz-init.c20
-rw-r--r--src/afl-fuzz.c3
2 files changed, 12 insertions, 11 deletions
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index 1a724bfb..dd85a8f4 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -1363,16 +1363,6 @@ void setup_dirs_fds(afl_state_t *afl) {
}
- if (afl->is_master) {
-
- u8 *x = alloc_printf("%s/%s/is_master", afl->sync_dir, afl->sync_id);
- int fd = open(x, O_CREAT | O_RDWR, 0644);
- if (fd < 0) FATAL("cannot create %s", x);
- free(x);
- close(fd);
-
- }
-
if (mkdir(afl->out_dir, 0700)) {
if (errno != EEXIST) { PFATAL("Unable to create '%s'", afl->out_dir); }
@@ -1402,6 +1392,16 @@ void setup_dirs_fds(afl_state_t *afl) {
}
+ if (afl->is_master) {
+
+ u8 *x = alloc_printf("%s/is_master", afl->out_dir);
+ int fd = open(x, O_CREAT | O_RDWR, 0644);
+ if (fd < 0) FATAL("cannot create %s", x);
+ free(x);
+ close(fd);
+
+ }
+
/* Queue directory for any starting & discovered paths. */
tmp = alloc_printf("%s/queue", afl->out_dir);
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index 9240526e..94f47341 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1067,7 +1067,8 @@ int main(int argc, char **argv_orig, char **envp) {
if (afl->is_master && check_master_exists(afl) == 1) {
- WARNF("It is wasteful to run more than one master!");
+ WARNF("it is wasteful to run more than one master!");
+ sleep(1);
}