зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1678663 - Swallow exceptions during shutdown of fix_stacks.py, r=bc
Under Python 3 on Windows we sometimes get an OSError which may be a race with the process exiting. There's not much we can do about exceptions during shutdown so just ignore them. Differential Revision: https://phabricator.services.mozilla.com/D99434
This commit is contained in:
Родитель
2e4865bd40
Коммит
6b73ec608c
|
@ -67,8 +67,12 @@ def fixSymbols(
|
|||
# because it is more forceful than `wait()`, and the Python docs warn
|
||||
# about possible deadlocks with `wait()`.
|
||||
def cleanup(fix_stacks):
|
||||
fix_stacks.stdin.close()
|
||||
fix_stacks.terminate()
|
||||
for fn in [fix_stacks.stdin.close, fix_stacks.terminate]:
|
||||
|
||||
try:
|
||||
fn()
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
atexit.register(cleanup, fix_stacks)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче