[PATCH v4 0/2] libcamera: process: Pass stderr and reserve stdin and stdout fds
Julien Vuillaumier
julien.vuillaumier at nxp.com
Tue May 27 17:56:13 CEST 2025
Hello,
This is the v4 of this patch aimed at letting a child process to log
onto parent's stderr, and making sure that its stdin/stdout/stderr
fds are not free to reuse.
Change history:
v4:
- use _exit() instead of exit() in child process (comment from Barnabás)
- while at it, also change an existing exit() to _exit(), in case of
execv() failure
v3:
- Give the option to inherit from any standard file descriptor from
the parent
- Fix a possible self duplication of descriptors
- Fix the null device descriptor that unnecessarily remains opens
v2:
- Pass only parent's stderr to the child process for logging purpose
- Reallocate child's stdin/stdout file descriptors to /dev/null (daemon style) so
that they are not recycled for other usage
Thanks,
Julien
Julien Vuillaumier (2):
libcamera: process: Use _exit in child process
libcamera: process: Pass stderr and reserve stdin and stdout fds
src/libcamera/process.cpp | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
--
2.34.1
More information about the libcamera-devel
mailing list