[PATCH v4 1/2] libcamera: process: Use _exit in child process

Paul Elder paul.elder at ideasonboard.com
Thu May 29 12:43:35 CEST 2025


Quoting Julien Vuillaumier (2025-05-28 00:56:14)
> Use _exit() in child process in case of execv() error. That is to
> avoid interfering with the parent process as exit() may call its
> atexit() handlers and flush its io buffers.
> 
> Signed-off-by: Julien Vuillaumier <julien.vuillaumier at nxp.com>

Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>

> ---
>  src/libcamera/process.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
> index 68fad327..7f3a6518 100644
> --- a/src/libcamera/process.cpp
> +++ b/src/libcamera/process.cpp
> @@ -274,7 +274,7 @@ int Process::start(const std::string &path,
>  
>                 execv(path.c_str(), (char **)argv);
>  
> -               exit(EXIT_FAILURE);
> +               _exit(EXIT_FAILURE);
>         }
>  }
>  
> -- 
> 2.34.1
>


More information about the libcamera-devel mailing list