◐ Shell
clean mode source ↗

bpo-36670, regrtest: Fix TestWorkerProcess.stop() by vstinner · Pull Request #16530 · python/cpython

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@vstinner

  • Add a RLock to TestWorkerProcess to make stop() reliable when
    regrtest is interrupted by CTRL+c: protect _popen and _killed
    attributes.
  • Fix _kill(): don't set _killed to True if _popen is None.
  • Fix TestWorkerProcess.repr(): start_time is only valid
    if _popen is not None.

https://bugs.python.org/issue36670

* Add a RLock to TestWorkerProcess to make stop() reliable when
  regrtest is interrupted by CTRL+c: protect _popen and _killed
  attributes.
* Fix _kill(): don't set _killed to True if _popen is None.
* Fix TestWorkerProcess.__repr__(): start_time is only valid
  if _popen is not None.

@vstinner

I'm not sure if my lock is correct, so I wrote a simpler PR with no lock: PR #16537.

Labels