Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 5, 2023

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

  • Use subprocess context manager ("with proc:").
  • Use sleeping_retry() to wait until the child process is ready.
  • Replace SIGINT with proc.kill() on error.
  • Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
    ready.
  • Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
    exit.
    (cherry picked from commit aaf297c)

Co-authored-by: Victor Stinner [email protected]

…110421)

Replace os.kill() with proc.kill() which catchs PermissionError.

Rewrite _kill_with_event():

* Use subprocess context manager ("with proc:").
* Use sleeping_retry() to wait until the child process is ready.
* Replace SIGINT with proc.kill() on error.
* Replace 10 seconds with SHORT_TIMEOUT to wait until the process is
  ready.
* Replace 0.5 seconds with SHORT_TIMEOUT to wait for the process
  exit.
(cherry picked from commit aaf297c)

Co-authored-by: Victor Stinner <[email protected]>
@bedevere-app bedevere-app bot added tests Tests in the Lib/test dir awaiting review labels Oct 5, 2023
@vstinner vstinner enabled auto-merge (squash) October 5, 2023 21:41
@vstinner vstinner merged commit 6af359b into python:3.12 Oct 5, 2023
@miss-islington miss-islington deleted the backport-aaf297c-3.12 branch October 5, 2023 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants