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 <cuiziwei@xiaomi.com>
This commit is contained in:
cuiziwei 2026-04-28 15:05:46 +08:00 committed by Lup Yuen Lee
parent 34e0663e2d
commit f106e07f00

View file

@ -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);