summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-08 09:25:20 +0100
committerAngelos Evripiotis <jevripiotis@bloomberg.net>2019-10-15 15:32:23 +0100
commitbfa2763e51b80ce6d4dfdd558d7dc53d855e57ce (patch)
treeb86890e940b068e4fe8ef33c569a3105e138705c
parent23d1f1350baadabd6332de128bab318ed81b34e5 (diff)
downloadbuildstream-bfa2763e51b80ce6d4dfdd558d7dc53d855e57ce.tar.gz
_signals.suspendable: early-out on win32
-rw-r--r--src/buildstream/_signals.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/buildstream/_signals.py b/src/buildstream/_signals.py
index a7f32d626..a29cbdc7d 100644
--- a/src/buildstream/_signals.py
+++ b/src/buildstream/_signals.py
@@ -144,6 +144,12 @@ def suspend_handler(sig, frame):
#
@contextmanager
def suspendable(suspend_callback, resume_callback):
+ if sys.platform == 'win32':
+ # Win32 does not support SIGTSTP, at least up to Windows 10, so we
+ # won't be able to handle it here.
+ yield
+ return
+
global suspendable_stack # pylint: disable=global-statement
is_outermost = bool(not suspendable_stack)