sched/task: Fix wrong return value from nxspawn_open()

nxspawn_open() is expected to return "OK" when it success, but
it doesn't return it in case of executing dup2.
Because of this, the "Command as parameter" couldn't work with
Builtin Apps.
This commit is contained in:
SPRESENSE 2021-07-20 13:42:12 +09:00 committed by saramonteiro
parent 7a580ae3bc
commit 5db4d2a83b

View File

@ -128,6 +128,10 @@ static inline int nxspawn_open(FAR struct spawn_open_file_action_s *action)
{
serr("ERROR: dup2 failed: %d\n", ret);
}
else
{
ret = OK;
}
sinfo("Closing fd=%d\n", fd);
nx_close(fd);