From cd62ab5398e7dad1ef63bb7b888ad50a2a8c3d55 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 22 Aug 2018 12:06:28 -0600 Subject: [PATCH] Revert "apps/builtin/exec_builtin.c: Fix a error introduced by recent comments. Found in build testing." This reverts commit 64e423a49c86bd3401d3816a6f7ffb3f1c9ff7b6. --- builtin/exec_builtin.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/builtin/exec_builtin.c b/builtin/exec_builtin.c index 05ccce779..df35e58eb 100644 --- a/builtin/exec_builtin.c +++ b/builtin/exec_builtin.c @@ -181,26 +181,20 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv, } } -#idef CONFIG_LIBC_EXECFUNCS - /* A NULL entry point implies that the task is a loadable application */ + /* Start the built-in */ - if (builtin->main == NULL) + if (builtin->main) { - /* Load and execute the application. */ - - ret = posix_spawn(&pid, builtin->name, &file_actions, - &attr, (argv) ? &argv[1] : (FAR char * const *)NULL, - NULL); - } - else -#endif - { - /* Start the built-in */ - ret = task_spawn(&pid, builtin->name, builtin->main, &file_actions, &attr, (argv) ? &argv[1] : (FAR char * const *)NULL, (FAR char * const *)NULL); } + else + { + ret = posix_spawn(&pid, builtin->name, &file_actions, + &attr, (argv) ? &argv[1] : (FAR char * const *)NULL, + NULL); + } if (ret != 0) {