posix_spawn() and execve() logged every failed exec at error level. A
shell normally tries a program first: NSH with CONFIG_NSH_FILE_APPS
spawns each command from PATH before its built-in command, and bash
runs a script itself when execve() returns ENOEXEC. So every built-in
NSH command printed
nxposix_spawn_exec: ERROR: exec failed: 2
although nothing was wrong. The caller gets the error code and reports
it if it needs to.
Do not log ENOENT and ENOEXEC. Other errors are logged as before.
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>