diff options
Diffstat (limited to 'src/exec.c')
-rw-r--r-- | src/exec.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -352,6 +352,9 @@ static void bfs_exec_closewd(struct bfs_exec *execbuf, const struct BFTW *ftwbuf /** Actually spawn the process. */ static int bfs_exec_spawn(const struct bfs_exec *execbuf) { + // Flush the context state for consistency with the external process + bfs_ctx_flush(execbuf->ctx); + if (execbuf->flags & BFS_EXEC_CONFIRM) { for (size_t i = 0; i < execbuf->argc; ++i) { if (fprintf(stderr, "%s ", execbuf->argv[i]) < 0) { @@ -368,9 +371,6 @@ static int bfs_exec_spawn(const struct bfs_exec *execbuf) { } } - // Flush cached state for consistency with the external process - bfs_ctx_flush(execbuf->ctx); - if (execbuf->flags & BFS_EXEC_MULTI) { bfs_exec_debug(execbuf, "Executing '%s' ... [%zu arguments] (size %zu)\n", execbuf->argv[0], execbuf->argc - 1, execbuf->arg_size); |