netutils/dropbear: retain child exit status for NSH PTY session#3648
Open
FelipeMdeO wants to merge 1 commit into
Open
netutils/dropbear: retain child exit status for NSH PTY session#3648FelipeMdeO wants to merge 1 commit into
FelipeMdeO wants to merge 1 commit into
Conversation
The per-session NSH task is reaped with waitpid() in
dropbear_nshsession.c. Without CONFIG_SCHED_CHILD_STATUS the kernel does
not retain the child exit status, so waitpid() returns ECHILD right after
authentication and the interactive SSH session never starts
("NSH session wait failed: Unknown error 10").
Depend on SCHED_HAVE_PARENT (required by SCHED_CHILD_STATUS) and select
SCHED_CHILD_STATUS so any Dropbear build gets a working interactive
session, independent of the chacha20-poly1305 / PBKDF2 work.
Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
Contributor
Author
|
Hello @acassis , @xiaoxiang781216 , @linguini1 , can you take a look, please? |
linguini1
approved these changes
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Dropbear reaps the per-session NSH task with
waitpid()indropbear_nshsession.c. WithoutCONFIG_SCHED_CHILD_STATUSthe kernel doesnot retain the child exit status, so
waitpid()returnsECHILDright afterauthentication and the interactive session never starts
(
NSH session wait failed: Unknown error 10).The issue was reported here: apache/nuttx#19209
Depend on
SCHED_HAVE_PARENT(required bySCHED_CHILD_STATUS) and selectSCHED_CHILD_STATUSso any Dropbear build gets a working interactive session.Impact
Kconfig-only, 2 lines. Fixes interactive SSH sessions for
NETUTILS_DROPBEAR.No dependency on other in-flight work.
Testing
Built
sim:dropbear(nuttx master + this change) and connected over SSH:on device side:
On host side: