diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-12-19 02:14:30 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2019-12-19 02:14:30 +0530 |
commit | 675cec1ed2933faf23c40bfd6e6c069fe0fd6a4c (patch) | |
tree | a5baf60a1988e677b666acdc9cf7fa698577089d | |
parent | 4bf0504e2a1af0c55f5d930255fb57dc4eea9586 (diff) | |
download | gstreamer-675cec1ed2933faf23c40bfd6e6c069fe0fd6a4c.tar.gz |
gst-env: Ignore SIGINT when using the fish shell
After discussion with fish upstream it looks like it will take some
work to fix this issue.
https://github.com/fish-shell/fish-shell/pull/6426#issuecomment-567174105
In the meantime, this only happens when there's no command running in
the terminal, and in that case the shell just ignores it anyway. So
just do that in `gst-env.py`.
Fixes https://gitlab.freedesktop.org/gstreamer/gst-build/issues/18
-rwxr-xr-x | gst-env.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gst-env.py b/gst-env.py index ad00cd8546..64196428be 100755 --- a/gst-env.py +++ b/gst-env.py @@ -12,6 +12,7 @@ import subprocess import sys import tempfile import pathlib +import signal from distutils.sysconfig import get_python_lib from distutils.util import strtobool @@ -384,6 +385,11 @@ if __name__ == "__main__": # Let the GC remove the tmp file args.append("--rcfile") args.append(tmprc.name) + if 'fish' in args[0]: + # Ignore SIGINT while using fish as the shell to make it behave + # like other shells such as bash and zsh. + # See: https://gitlab.freedesktop.org/gstreamer/gst-build/issues/18 + signal.signal(signal.SIGINT, lambda x, y: True) try: exit(subprocess.call(args, close_fds=False, env=get_subprocess_env(options, gst_version))) |