Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924313 - sys-apps/portage: portage.process._exec should wrap pid-sandbox os.fork() with _start_fork for error handling
Summary: sys-apps/portage: portage.process._exec should wrap pid-sandbox os.fork() wit...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 921380
Blocks: 914876
  Show dependency tree
 
Reported: 2024-02-11 21:38 UTC by Zac Medico
Modified: 2024-02-22 07:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2024-02-11 21:38:57 UTC
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.
Comment 1 Larry the Git Cow gentoo-dev 2024-02-12 07:58:05 UTC
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(-)