You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/02/04 08:22:43 UTC

[buildstream] 07/25: _signals.suspendable: early-out on win32

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch aevri/win32_minimal
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit bf378bf4a7fbf7433ef370b3d708ae89632e2b25
Author: Angelos Evripiotis <je...@bloomberg.net>
AuthorDate: Tue Oct 8 09:25:20 2019 +0100

    _signals.suspendable: early-out on win32
---
 src/buildstream/_signals.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/buildstream/_signals.py b/src/buildstream/_signals.py
index a7f32d6..a29cbdc 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)