Skip to content

Commit

Permalink
nsh/parse: Try FILE_APPS first in the case of builtin
Browse files Browse the repository at this point in the history
Signed-off-by: chao.an <anchao@xiaomi.com>
  • Loading branch information
anchao authored and patacongo committed May 18, 2020
1 parent 898c1ce commit 8997213
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions builtin/exec_builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,17 +182,12 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv,
}

#ifdef CONFIG_LIBC_EXECFUNCS
/* A NULL entry point implies that the task is a loadable application */
/* Load and execute the application. */

if (builtin->main == NULL)
{
/* Load and execute the application. */
ret = posix_spawn(&pid, builtin->name, &file_actions, &attr,
(argv) ? &argv[1] : (FAR char * const *)NULL, NULL);

ret = posix_spawn(&pid, builtin->name, &file_actions,
&attr, (argv) ? &argv[1] : (FAR char * const *)NULL,
NULL);
}
else
if (ret != 0 && builtin->main != NULL)
#endif
{
/* Start the built-in */
Expand Down

0 comments on commit 8997213

Please sign in to comment.