You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "casaroli (via GitHub)" <gi...@apache.org> on 2026/10/09 06:21:08 UTC
[PR] sched/task: Do not log a missing or unloadable program as an exec error. [nuttx]
casaroli opened a new pull request, #20543:
URL: https://github.com/apache/nuttx/pull/20543
## Summary
`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 with `CONFIG_DEBUG_SCHED_ERROR` every built-in NSH command printed an error although nothing was wrong.
This PR stops logging `ENOENT` (no such program) and `ENOEXEC` (not a loadable format). The caller gets the error code and reports it if it needs to. Other errors are logged as before.
## Impact
Debug output only, with `CONFIG_DEBUG_SCHED_ERROR`. No change to return values or `errno`.
## Testing
`qemu-armv8a:knsh` with `CONFIG_DEBUG_SCHED_ERROR=y`, QEMU 11.
Before:
```
nsh> mkdir /tmp2
nxposix_spawn_exec: ERROR: exec failed: 2
nsh> foo
nxposix_spawn_exec: ERROR: exec failed: 2
nsh: foo: command not found
```
After:
```
nsh> mkdir /tmp2
nsh> foo
nsh: foo: command not found
```
`mps2-an500:nsh` with the same options builds with `-Werror`. `tools/checkpatch.sh -c -u -m -g` passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: Do not log a missing or unloadable program as an exec error. [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #20543:
URL: https://github.com/apache/nuttx/pull/20543
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] sched/task: Do not log a missing or unloadable program as an exec error. [nuttx]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #20543:
URL: https://github.com/apache/nuttx/pull/20543#issuecomment-6075639777
<!-- membrowse-pr-comment -->
## <img src="https://membrowse.com/membrowse-logo.svg" height="24" align="top"> MemBrowse Memory Report
### [qemu-armv8a](https://membrowse.com/public/apache/nuttx/target/qemu-armv8a/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- **Code**: .text.posix_spawn +12 B (+0.0%, 346,992 B)
*No memory changes detected for:*
- [arduino-mega2560](https://membrowse.com/public/apache/nuttx/target/arduino-mega2560/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [esp32-devkitc](https://membrowse.com/public/apache/nuttx/target/esp32-devkitc/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [hifive1-revb](https://membrowse.com/public/apache/nuttx/target/hifive1-revb/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [mirtoo](https://membrowse.com/public/apache/nuttx/target/mirtoo/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [qemu-intel64](https://membrowse.com/public/apache/nuttx/target/qemu-intel64/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [rx65n-rsk2mb](https://membrowse.com/public/apache/nuttx/target/rx65n-rsk2mb/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [s698pm-dkit](https://membrowse.com/public/apache/nuttx/target/s698pm-dkit/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
- [stm32-nucleo-f103rb](https://membrowse.com/public/apache/nuttx/target/stm32-nucleo-f103rb/compare?head=b3dbd7b66fc80dbab15a374f0eb26167eafd5920&base=cc2edca9641f3a6e3559d8a8e11ba9b9fa0c758e)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org