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

@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.

@vstinner