cuiziweizw opened a new pull request, #3515:
URL: https://github.com/apache/nuttx-apps/pull/3515

   ## Summary
   
   - **system/popen**: add `dpopen()`/`dpclose()` as the descriptor-based
     counterpart of `popen()`/`pclose()`, analogous to how `dprintf()`
     relates to `fprintf()`. `dpopen()` returns a raw file descriptor
     instead of a `FILE` stream, avoiding the `stdio.h` dependency for
     callers that only need an fd. `popen()` is refactored as a thin
     wrapper: `dpopen()` + `fdopen()` + FILE container.
   - **system/popen**: support no-shell mode via `posix_spawnp()`. The hard
     dependency on `NSH_LIBRARY` is removed; when NSH is unavailable,
     commands are split by whitespace and executed directly. Adds
     `CONFIG_SYSTEM_POPEN_MAXARGUMENTS` (default 7).
   - **testing/libc/popen**: add popen/dpopen tests covering both shell
     (NSH) and no-shell modes.
   
   Depends on the header declarations in the companion nuttx PR:
   apache/nuttx#19008
   
   ## Testing
   
   Ran the new `testing/libc/popen` test in both shell and no-shell
   configurations; all 8 cases pass.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to