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:
wangjianyu3 2026-08-28 21:13:53 +08:00 • committed by GUIDINGLI
parent 64f65dbf3d
commit 5f7db152b2

View file

@ -323,7 +323,7 @@ static int cmd_rptun(FAR struct action_manager_s *am,
}
close(fd);
return ret;
return ret < 0 ? ret : 0;
}
#endif