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 <julien.vuillaumier@nxp.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Julien Vuillaumier 2025-05-27 17:56:14 +02:00 committed by Kieran Bingham
parent f58077f073
commit 32905fdd0b

View file

@ -274,7 +274,7 @@ int Process::start(const std::string &path,
execv(path.c_str(), (char **)argv); execv(path.c_str(), (char **)argv);
exit(EXIT_FAILURE); _exit(EXIT_FAILURE);
} }
} }