Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.spawn: Use multiprocessing.Process for returnproc #1249

Merged

Commits on Feb 3, 2024

  1. ForkProcess: Use duplicate fd_pipes in _send_fd_pipes thread

    In order to allow callers to manage the lifecycle of fd_pipes
    file descriptors, create duplicates for _send_fd_pipes to
    close when it has finished sending them.
    
    This fixes bug 916601 in a nice way, allowing commit
    3b1234b to be reverted.
    
    Bug: https://bugs.gentoo.org/916601
    Signed-off-by: Zac Medico <zmedico@gentoo.org>
    zmedico committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    9f96ce5 View commit details
    Browse the repository at this point in the history
  2. Revert "testAsyncFunctionStdin: multiprocessing spawn compat"

    This reverts commit 3b1234b,
    since ForkProcess now solves the problem by creating temporary
    duplicate file descriptors.
    
    Bug: https://bugs.gentoo.org/916601
    Signed-off-by: Zac Medico <zmedico@gentoo.org>
    zmedico committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    7ea1175 View commit details
    Browse the repository at this point in the history
  3. process.spawn: Use multiprocessing.Process for returnproc

    Use multiprocessing.Process for returnproc, so that
    fork will stop being used when python makes "spawn"
    the default multiprocessing start method.
    
    Continue to use _start_fork when returnproc is not
    enabled, for backward compatibility. Ultimately,
    it can be removed at the same time as the returnpid
    parameter.
    
    Bug: https://bugs.gentoo.org/916566
    Signed-off-by: Zac Medico <zmedico@gentoo.org>
    zmedico committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    305612d View commit details
    Browse the repository at this point in the history