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
import sys
import tempfile
import pathlib
+import signal
from distutils.sysconfig import get_python_lib
from distutils.util import strtobool
# 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)))