This is an automated email from the ASF dual-hosted git repository.
lupyuen 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 f106e07f00f include/unistd: add dpopen/dpclose declarations
f106e07f00f is described below
commit f106e07f00f0906d50852fd686519fa662f93e4e
Author: cuiziwei <[email protected]>
AuthorDate: Tue Apr 28 15:05:46 2026 +0800
include/unistd: add dpopen/dpclose declarations
Add declarations for dpopen() and dpclose() to unistd.h. These are
the descriptor-based counterparts of popen()/pclose() declared in
stdio.h. The implementation lives in apps/system/popen/dpopen.c.
Signed-off-by: cuiziwei <[email protected]>
---
include/unistd.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/unistd.h b/include/unistd.h
index 4948ae82834..acfc0e0bb48 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -397,6 +397,15 @@ FAR void *sbrk(intptr_t incr);
int pipe(int pipefd[2]);
int pipe2(int pipefd[2], int flags);
+/* Pipe-based process I/O. These are not actually implemented in the OS.
+ * See apps/system/popen for implementation.
+ */
+
+#ifndef __KERNEL__
+int dpopen(FAR const char *, int, FAR pid_t *);
+int dpclose(int, pid_t);
+#endif
+
/* Schedule an alarm */
unsigned int alarm(unsigned int seconds);