exec_builtin was not using the provided open flags

This commit is contained in:
Gregory Nutt 2016-07-10 08:10:57 -06:00
parent 46f082a4dc
commit c64e61df3e

View File

@ -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);