The portage.process._exec currently calls os.fork() directly, but it could use _start_fork for error handling for error handling related to bug 345289.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=419cce79f9082308c848df0a98f367de4d1c50a3 commit 419cce79f9082308c848df0a98f367de4d1c50a3 Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2024-02-11 21:58:10 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-02-12 07:56:10 +0000 process._exec: Use _start_fork for os.fork() error handling Use _start_fork for os.fork() error handling, ensuring that if exec fails then the child process will display a traceback before it exits via os._exit to suppress any finally blocks from parent's call stack (bug 345289). Bug: https://bugs.gentoo.org/345289 Bug: https://bugs.gentoo.org/916566 Bug: https://bugs.gentoo.org/924313 Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/process.py | 259 ++++++++++++++++++++++++++++--------------------- 1 file changed, 151 insertions(+), 108 deletions(-)