diff options
author | Angelos Evripiotis <jevripiotis@bloomberg.net> | 2017-12-13 12:45:57 +0000 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2017-12-13 12:52:41 -0500 |
commit | 82f4afdd11b96d2425781e14a27cad6f34c967c9 (patch) | |
tree | 53310bcd0c65ae59f8940f0d355825c1af12636d | |
parent | 683a6d406aa91d1cf51e0fd6b1adf3f1ff77eac6 (diff) | |
download | buildstream-82f4afdd11b96d2425781e14a27cad6f34c967c9.tar.gz |
_signals: note os._exit() on terminate
Make it explicit that we should not rely on 'finally' clauses to clean
up for us in the event of termination.
-rw-r--r-- | buildstream/_signals.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/_signals.py b/buildstream/_signals.py index 9bf95f920..b8fd74e07 100644 --- a/buildstream/_signals.py +++ b/buildstream/_signals.py @@ -47,6 +47,10 @@ def terminator_handler(signal, frame): # that while the code block is running, the supplied function # will be called upon process termination. # +# Note that after handlers are called, the termination will be handled by +# terminating immediately with os._exit(). This means that SystemExit will not +# be raised and 'finally' clauses will not be executed. +# # Args: # terminate_func (callable): A function to call when aborting # the nested code block. |