mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-01 19:36:36 +00:00
system/nxinit: fix rptun builtin blocking the action queue
RPTUNIOC_START returns the (positive) pid of the rptun kernel thread in async mode (CONFIG_RPTUN_START_SYNC unset). The action engine treats any positive builtin return value as the pid of a spawned child and waitpid()s on it (action.c: "if (ret > 0) pid_running = ret"). The rptun thread is a detached kthread, never a child of init, so that wait blocks the whole action queue forever and "on init" / console never run. Normalize a successful start to 0. Assisted-by: OpenCode:claude-sonnet-5 Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
64f65dbf3d
commit
5f7db152b2
1 changed files with 1 additions and 1 deletions
|
|
@ -323,7 +323,7 @@ static int cmd_rptun(FAR struct action_manager_s *am,
|
|||
}
|
||||
|
||||
close(fd);
|
||||
return ret;
|
||||
return ret < 0 ? ret : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue