gst-env: Ignore SIGINT when running on the CI server
authorThibault Saunier <tsaunier@igalia.com>
Fri, 8 Oct 2021 14:54:22 +0000 (11:54 -0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 12 Oct 2021 16:59:16 +0000 (16:59 +0000)
We get spurious sigint and this is just a small temporary workaround

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1113>

gst-env.py

index 5223a13..7b7d3ae 100755 (executable)
@@ -582,6 +582,10 @@ if __name__ == "__main__":
                 print('{}={}'.format(name, shlex.quote(value)))
                 print('export {}'.format(name))
         else:
+            if os.environ.get("CI_PROJECT_NAME"):
+                print("Ignoring SIGINT when running on the CI,"
+                      " as we get spurious sigint in there for some reason.")
+                signal.signal(signal.SIGINT, signal.SIG_IGN)
             exit(subprocess.call(args, close_fds=False, env=env))
 
     except subprocess.CalledProcessError as e: