From 32905fdd0b63a10886dc43bd8d0a0b2e843de47b Mon Sep 17 00:00:00 2001 From: Julien Vuillaumier Date: Tue, 27 May 2025 17:56:14 +0200 Subject: [PATCH] libcamera: process: Use _exit in child process 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 Reviewed-by: Kieran Bingham Reviewed-by: Paul Elder Signed-off-by: Kieran Bingham --- 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 68fad3270..7f3a6518c 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); } }