This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f21fe243218 boards: Use the popen() of libc instead of system/popen.
f21fe243218 is described below

commit f21fe243218c1c263479c067861bb461f5192b55
Author: Marco Casaroli <[email protected]>
AuthorDate: Sun Oct 18 23:02:18 2026 +0200

    boards: Use the popen() of libc instead of system/popen.
    
    libc now has popen(), pclose(), dpopen() and dpclose() when CONFIG_PIPES,
    CONFIG_LIBC_EXECFUNCS and CONFIG_SCHED_WAITPID are set.  The apps copy
    in system/popen is not needed any more.
    
    Disable CONFIG_SYSTEM_POPEN in the 15 configurations that enabled it.
    Enable CONFIG_SCHED_WAITPID, which CONFIG_SYSTEM_POPEN selected, and
    CONFIG_LIBC_EXECFUNCS where they did not have it.  Their users of
    popen() (the fastboot shell command, the popen example) stay enabled.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 boards/arm/imx6/sabre-6quad/configs/citest/defconfig                   | 3 ++-
 boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig                   | 2 --
 boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig               | 1 -
 boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig                 | 2 +-
 boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig               | 3 +--
 boards/sim/sim/sim/configs/citest/defconfig                            | 2 +-
 boards/sim/sim/sim/configs/quickjs/defconfig                           | 2 +-
 boards/sim/sim/sim/configs/sqlite/defconfig                            | 1 -
 boards/x86_64/qemu/qemu-intel64/configs/citest_smp/defconfig           | 3 ++-
 boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig        | 2 +-
 boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig    | 2 +-
 boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_usb/defconfig    | 1 -
 boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig    | 2 +-
 .../xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig   | 2 +-
 .../xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_usb/defconfig   | 1 -
 15 files changed, 12 insertions(+), 17 deletions(-)

diff --git a/boards/arm/imx6/sabre-6quad/configs/citest/defconfig 
b/boards/arm/imx6/sabre-6quad/configs/citest/defconfig
index daceae1df4b..a98a231709d 100644
--- a/boards/arm/imx6/sabre-6quad/configs/citest/defconfig
+++ b/boards/arm/imx6/sabre-6quad/configs/citest/defconfig
@@ -41,6 +41,7 @@ CONFIG_IMX6_UART1=y
 CONFIG_IMX_DDR_SIZE=1073741824
 CONFIG_INIT_ENTRYPOINT="nsh_main"
 CONFIG_INTELHEX_BINARY=y
+CONFIG_LIBC_EXECFUNCS=y
 CONFIG_MM_IOB=y
 CONFIG_NET=y
 CONFIG_NETDEV_LATEINIT=y
@@ -57,12 +58,12 @@ CONFIG_READLINE_CMD_HISTORY=y
 CONFIG_RR_INTERVAL=200
 CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_HPWORKPRIORITY=192
+CONFIG_SCHED_WAITPID=y
 CONFIG_STACK_COLORATION=y
 CONFIG_START_MONTH=3
 CONFIG_START_YEAR=2016
 CONFIG_SYMTAB_ORDEREDBYNAME=y
 CONFIG_SYSTEM_NSH=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_SYSTEM_SETLOGMASK=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_HEAP=y
diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig 
b/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig
index 394cb329a7b..4a00424e79a 100644
--- a/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig
+++ b/boards/arm/lpc17xx_40xx/lx_cpu/configs/nsh/defconfig
@@ -150,8 +150,6 @@ CONFIG_SYSTEM_NSH_STACKSIZE=4096
 CONFIG_SYSTEM_NTPC=y
 CONFIG_SYSTEM_NTPC_STACKSIZE=4096
 CONFIG_SYSTEM_PING=y
-CONFIG_SYSTEM_POPEN=y
-CONFIG_SYSTEM_POPEN_STACKSIZE=4096
 CONFIG_SYSTEM_SETLOGMASK=y
 CONFIG_SYSTEM_SYSTEM=y
 CONFIG_SYSTEM_TEE=y
diff --git a/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig 
b/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig
index 1bb1b88fb08..0f711d24fce 100644
--- a/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig
+++ b/boards/arm64/qemu/qemu-armv8a/configs/fastboot/defconfig
@@ -104,7 +104,6 @@ CONFIG_SYSTEM_NXINIT=y
 CONFIG_SYSTEM_NXPLAYER=y
 CONFIG_SYSTEM_NXRECORDER=y
 CONFIG_SYSTEM_PING=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_SYSTEM_SYSTEM=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_OSTEST=y
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig
index ed3468054af..8a3d21dbfa4 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest/defconfig
@@ -113,6 +113,7 @@ CONFIG_SCHED_LPNTHREADS=1
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_THREAD_LOCAL=y
 CONFIG_SCHED_USER_IDENTITY=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SERIAL_UART_ARCH_MMIO=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SIG_EVTHREAD=y
@@ -124,7 +125,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=3072
 CONFIG_SYSTEM_NXINIT=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_SYSTEM_SETLOGMASK=y
 CONFIG_TESTING_CMOCKA=y
 CONFIG_TESTING_CMOCKA_PROG=y
diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig 
b/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig
index 090c3840b3f..9f18ea34a0f 100644
--- a/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig
+++ b/boards/risc-v/qemu-rv/rv-virt/configs/citest64/defconfig
@@ -76,6 +76,7 @@ CONFIG_SCHED_CHILD_STATUS=y
 CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_HPWORK=y
 CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SERIAL_UART_ARCH_MMIO=y
 CONFIG_STACK_COLORATION=y
 CONFIG_START_MONTH=12
@@ -84,8 +85,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=4096
 CONFIG_SYSTEM_NXINIT=y
-CONFIG_SYSTEM_POPEN=y
-CONFIG_SYSTEM_POPEN_STACKSIZE=3072
 CONFIG_SYSTEM_SETLOGMASK=y
 CONFIG_TESTING_GETPRIME=y
 CONFIG_TESTING_HEAP=y
diff --git a/boards/sim/sim/sim/configs/citest/defconfig 
b/boards/sim/sim/sim/configs/citest/defconfig
index 6bbbba4b759..753255fe419 100644
--- a/boards/sim/sim/sim/configs/citest/defconfig
+++ b/boards/sim/sim/sim/configs/citest/defconfig
@@ -129,6 +129,7 @@ CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_LPNTHREADS=1
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_USER_IDENTITY=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SIG_EVTHREAD=y
 CONFIG_SIM_WALLTIME_SIGNAL=y
@@ -138,7 +139,6 @@ CONFIG_START_YEAR=2008
 CONFIG_SYSTEM_DUMPSTACK=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NXINIT=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_SYSTEM_SETLOGMASK=y
 CONFIG_TESTING_CMOCKA=y
 CONFIG_TESTING_CMOCKA_PROG=y
diff --git a/boards/sim/sim/sim/configs/quickjs/defconfig 
b/boards/sim/sim/sim/configs/quickjs/defconfig
index c5389042791..edf541dbfed 100644
--- a/boards/sim/sim/sim/configs/quickjs/defconfig
+++ b/boards/sim/sim/sim/configs/quickjs/defconfig
@@ -61,11 +61,11 @@ CONFIG_SCHED_BACKTRACE=y
 CONFIG_SCHED_CHILD_STATUS=y
 CONFIG_SCHED_EVENTS=y
 CONFIG_SCHED_HAVE_PARENT=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIM_WALLTIME_SIGNAL=y
 CONFIG_START_MONTH=6
 CONFIG_START_YEAR=2008
 CONFIG_SYSTEM_DUMPSTACK=y
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NXINIT=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_TESTING_OSTEST=y
diff --git a/boards/sim/sim/sim/configs/sqlite/defconfig 
b/boards/sim/sim/sim/configs/sqlite/defconfig
index b220ac914c3..0c8b6ea7e61 100644
--- a/boards/sim/sim/sim/configs/sqlite/defconfig
+++ b/boards/sim/sim/sim/configs/sqlite/defconfig
@@ -60,6 +60,5 @@ CONFIG_START_MONTH=6
 CONFIG_START_YEAR=2008
 CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NXINIT=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_SYSTEM_SYSTEM=y
 CONFIG_UTILS_SQLITE=y
diff --git a/boards/x86_64/qemu/qemu-intel64/configs/citest_smp/defconfig 
b/boards/x86_64/qemu/qemu-intel64/configs/citest_smp/defconfig
index 32b437b4297..7121814230c 100644
--- a/boards/x86_64/qemu/qemu-intel64/configs/citest_smp/defconfig
+++ b/boards/x86_64/qemu/qemu-intel64/configs/citest_smp/defconfig
@@ -74,6 +74,7 @@ CONFIG_IOB_ALIGNMENT=64
 CONFIG_IOB_BUFSIZE=2048
 CONFIG_IOB_NBUFFERS=1024
 CONFIG_IOB_NCHAINS=255
+CONFIG_LIBC_EXECFUNCS=y
 CONFIG_LIBC_LOCALE=y
 CONFIG_LIBC_MEMFD_ERROR=y
 CONFIG_LIBM=y
@@ -120,6 +121,7 @@ CONFIG_SCHED_LPNTHREADS=1
 CONFIG_SCHED_LPWORK=y
 CONFIG_SCHED_THREAD_LOCAL=y
 CONFIG_SCHED_TICKLESS=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIGNAL_FD=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SIG_EVTHREAD=y
@@ -129,7 +131,6 @@ CONFIG_START_MONTH=3
 CONFIG_START_YEAR=2011
 CONFIG_SYSTEM_CLE=y
 CONFIG_SYSTEM_NSH=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_SYSTEM_SETLOGMASK=y
 CONFIG_TESTING_ATOMIC=y
 CONFIG_TESTING_CMOCKA=y
diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig 
b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig
index 921520f81ab..f265fb2bb5f 100644
--- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig
+++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot/defconfig
@@ -84,6 +84,7 @@ CONFIG_RTC_DRIVER=y
 CONFIG_SCHED_CHILD_STATUS=y
 CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SMP=y
 CONFIG_SMP_NCPUS=2
@@ -100,7 +101,6 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=8192
 CONFIG_SYSTEM_NXINIT=y
 CONFIG_SYSTEM_PING=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_TIMER=y
 CONFIG_TLS_TASK_NELEM=4
 CONFIG_UART0_SERIAL_CONSOLE=y
diff --git 
a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig 
b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig
index 37d9016c4db..b14e1de4911 100644
--- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig
+++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_tcp/defconfig
@@ -77,6 +77,7 @@ CONFIG_RTC_DRIVER=y
 CONFIG_SCHED_CHILD_STATUS=y
 CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SMP=y
 CONFIG_SMP_NCPUS=2
@@ -92,7 +93,6 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=8192
 CONFIG_SYSTEM_NXINIT=y
 CONFIG_SYSTEM_PING=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_TIMER=y
 CONFIG_TLS_TASK_NELEM=4
 CONFIG_UART0_SERIAL_CONSOLE=y
diff --git 
a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_usb/defconfig 
b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_usb/defconfig
index cf1ad5e2eb3..3d51d8c87e0 100644
--- a/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_usb/defconfig
+++ b/boards/xtensa/esp32s3/esp32s3-devkit/configs/fastboot_usb/defconfig
@@ -13,6 +13,5 @@ CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SYSTEM_FASTBOOTD=y
 CONFIG_SYSTEM_FASTBOOTD_SHELL=y
 CONFIG_SYSTEM_FASTBOOTD_USB_BOARDCTL=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_USBADB=y
 CONFIG_USBFASTBOOT=y
diff --git 
a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig 
b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig
index 51c15ae5fc6..5e39d2cee99 100644
--- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig
+++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot/defconfig
@@ -84,6 +84,7 @@ CONFIG_RTC_DRIVER=y
 CONFIG_SCHED_CHILD_STATUS=y
 CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SMP=y
 CONFIG_SMP_NCPUS=2
@@ -100,7 +101,6 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=8192
 CONFIG_SYSTEM_NXINIT=y
 CONFIG_SYSTEM_PING=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_TIMER=y
 CONFIG_TLS_TASK_NELEM=4
 CONFIG_UART0_SERIAL_CONSOLE=y
diff --git 
a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig 
b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig
index 0888986b6c0..60fea770adf 100644
--- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig
+++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_tcp/defconfig
@@ -77,6 +77,7 @@ CONFIG_RTC_DRIVER=y
 CONFIG_SCHED_CHILD_STATUS=y
 CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SCHED_LPWORK=y
+CONFIG_SCHED_WAITPID=y
 CONFIG_SIG_DEFAULT=y
 CONFIG_SMP=y
 CONFIG_SMP_NCPUS=2
@@ -92,7 +93,6 @@ CONFIG_SYSTEM_NSH=y
 CONFIG_SYSTEM_NSH_STACKSIZE=8192
 CONFIG_SYSTEM_NXINIT=y
 CONFIG_SYSTEM_PING=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_TIMER=y
 CONFIG_TLS_TASK_NELEM=4
 CONFIG_UART0_SERIAL_CONSOLE=y
diff --git 
a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_usb/defconfig 
b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_usb/defconfig
index cf1ad5e2eb3..3d51d8c87e0 100644
--- a/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_usb/defconfig
+++ b/boards/xtensa/esp32s3/lckfb-szpi-esp32s3/configs/fastboot_usb/defconfig
@@ -13,6 +13,5 @@ CONFIG_SCHED_HAVE_PARENT=y
 CONFIG_SYSTEM_FASTBOOTD=y
 CONFIG_SYSTEM_FASTBOOTD_SHELL=y
 CONFIG_SYSTEM_FASTBOOTD_USB_BOARDCTL=y
-CONFIG_SYSTEM_POPEN=y
 CONFIG_USBADB=y
 CONFIG_USBFASTBOOT=y

Reply via email to