| Index: client/utils/subprocess42.py
|
| diff --git a/client/utils/subprocess42.py b/client/utils/subprocess42.py
|
| index ef82dcdf70e49d7087f27d20b1456ddca99c8ce8..ad56bdb010996b76af66b53c7936463723b506b1 100644
|
| --- a/client/utils/subprocess42.py
|
| +++ b/client/utils/subprocess42.py
|
| @@ -454,8 +454,11 @@ def set_signal_handler(signals, handler):
|
| @contextlib.contextmanager
|
| def Popen_with_handler(args, **kwargs):
|
| proc = None
|
| - def handler(_signum, _frame):
|
| + def handler(signum, _frame):
|
| if proc:
|
| + logging.info('Received signal %d; terminating', signum)
|
| + # There could be a race condition where the process already exited. Our
|
| + # subprocess implementation traps this.
|
| proc.terminate()
|
|
|
| with set_signal_handler(STOP_SIGNALS, handler):
|
|
|