From c64e61df3e871fa5a90a451bb612bd3e4eb44726 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 10 Jul 2016 08:10:57 -0600 Subject: [PATCH] exec_builtin was not using the provided open flags --- builtin/exec_builtin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/exec_builtin.c b/builtin/exec_builtin.c index 36ea5a656..0b4326147 100644 --- a/builtin/exec_builtin.c +++ b/builtin/exec_builtin.c @@ -173,7 +173,7 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv, /* Set up to close open redirfile and set to stdout (1) */ ret = posix_spawn_file_actions_addopen(&file_actions, 1, - redirfile, O_WRONLY, 0644); + redirfile, oflags, 0644); if (ret != 0) { serr("ERROR: posix_spawn_file_actions_addopen failed: %d\n", ret);