Repository navigation
[5/5] libs/libc: Build popen() without the check for the apps copy. - #20839
Merged
Merged
Conversation
libc did not build popen(), pclose(), dpopen() and dpclose() when CONFIG_SYSTEM_POPEN selected the copy in apps/system/popen. That copy and its option are removed from apps, so remove the check. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]>
apps/system/popen is removed, so remove its page. Describe the libc popen(), pclose(), dpopen() and dpclose() in a new page of the libc documentation: the options they need, the shell they start, and the fallback when there is no shell. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]>
xiaoxiang781216
approved these changes
Oct 20, 2026
|
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx/actions/runs/39420528204 |
xiaoxiang781216
approved these changes
Oct 21, 2026
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx/actions/runs/39563368119 |
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx/actions/runs/39773652187 |
acassis
approved these changes
Oct 23, 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
libc does not build
popen(),pclose(),dpopen()anddpclose()whenCONFIG_SYSTEM_POPENselects the copy inapps/system/popen([1/5] #20778). [4/5] apache/nuttx-apps#3890 removes that copy and the option from apps, so this PR removes the check fromlibs/libc/stdioandlibs/libc/unistd(Make.defs and CMakeLists.txt).The second commit removes the documentation page of
apps/system/popenand describes the libc functions in a new page of the libc documentation: the options they need, the shell they start, and how they start a command when there is no shell.Impact
No change for configurations without
CONFIG_SYSTEM_POPEN, which are all configurations after [3/5] #20792 and [4/5]. With an older apps tree that still setsCONFIG_SYSTEM_POPEN=y, both copies are compiled; the link takes the apps copy, as before.Testing
Built with [4/5] (apps); in each, libc builds
lib_popen.oandlib_dpopen.o, and no option of the defconfig is lost aftermake olddefconfig:qemu-armv8a:fastbootCONFIG_SYSTEM_FASTBOOTD_SHELL=ysabre-6quad:citest,rv-virt:citest,rv-virt:citest64CONFIG_EXAMPLES_POPEN=ylx_cpu:nshesp32s3-devkit:fastboot,:fastboot_tcp,:fastboot_usb,lckfb-szpi-esp32s3:fastboot,:fastboot_tcp,:fastboot_usbCONFIG_SYSTEM_FASTBOOTD_SHELL=ysim:citest,sim:quickjs(x86_64 Linux in Docker)CONFIG_EXAMPLES_POPEN=yinsim:citestqemu-intel64:citest_smp(x86_64 Linux in Docker)CONFIG_EXAMPLES_POPEN=ysim:sqlitewas not built: the build host has notclsh, which the SQLite build needs.Runtime on
qemu-armv8a:knshandqemu-armv8a:nsh(QEMU with HVF) withCONFIG_TESTING_POPENandCONFIG_EXAMPLES_POPEN:popen_testends with=== Results: 0 failed ===(8 tests), and thepopenexample reads the output ofhelpand exits with 0.With apps master (
system/popenstill present) andCONFIG_SYSTEM_POPEN=yonqemu-armv8a:nsh: both copies compile, the image links without errors and has onepopen(), the apps copy.tools/checkpatch.sh -c -u -m -gpasses.depends-on: [apache/nuttx-apps/pull/3890]