nsh/parse: Try FILE_APPS first in the case of builtin
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
parent
898c1ce4d2
commit
8997213c2a
@ -182,17 +182,12 @@ int exec_builtin(FAR const char *appname, FAR char * const *argv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_LIBC_EXECFUNCS
|
#ifdef CONFIG_LIBC_EXECFUNCS
|
||||||
/* A NULL entry point implies that the task is a loadable application */
|
|
||||||
|
|
||||||
if (builtin->main == NULL)
|
|
||||||
{
|
|
||||||
/* Load and execute the application. */
|
/* Load and execute the application. */
|
||||||
|
|
||||||
ret = posix_spawn(&pid, builtin->name, &file_actions,
|
ret = posix_spawn(&pid, builtin->name, &file_actions, &attr,
|
||||||
&attr, (argv) ? &argv[1] : (FAR char * const *)NULL,
|
(argv) ? &argv[1] : (FAR char * const *)NULL, NULL);
|
||||||
NULL);
|
|
||||||
}
|
if (ret != 0 && builtin->main != NULL)
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* Start the built-in */
|
/* Start the built-in */
|
||||||
|
Loading…
Reference in New Issue
Block a user