diff --git a/main/config.c b/main/config.c index 9f5fdc617b..2d707183c4 100644 --- a/main/config.c +++ b/main/config.c @@ -1056,9 +1056,10 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, /* #exec We create a tmp file, then we #include it, then we delete it. */ if (!do_include) { + struct timeval tv = ast_tvnow(); if (!ast_test_flag(&flags, CONFIG_FLAG_NOCACHE)) config_cache_attribute(configfile, ATTRIBUTE_EXEC, NULL, who_asked); - snprintf(exec_file, sizeof(exec_file), "/var/tmp/exec.%d.%ld", (int)time(NULL), (long)pthread_self()); + snprintf(exec_file, sizeof(exec_file), "/var/tmp/exec.%d%d.%ld", (int)tv.tv_sec, (int)tv.tv_usec, (long)pthread_self()); snprintf(cmd, sizeof(cmd), "%s > %s 2>&1", cur, exec_file); ast_safe_system(cmd); cur = exec_file;