mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
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
This commit is contained in:
parent
4bf0504e2a
commit
675cec1ed2
1 changed files with 6 additions and 0 deletions
|
@ -12,6 +12,7 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import pathlib
|
import pathlib
|
||||||
|
import signal
|
||||||
|
|
||||||
from distutils.sysconfig import get_python_lib
|
from distutils.sysconfig import get_python_lib
|
||||||
from distutils.util import strtobool
|
from distutils.util import strtobool
|
||||||
|
@ -384,6 +385,11 @@ if __name__ == "__main__":
|
||||||
# Let the GC remove the tmp file
|
# Let the GC remove the tmp file
|
||||||
args.append("--rcfile")
|
args.append("--rcfile")
|
||||||
args.append(tmprc.name)
|
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:
|
try:
|
||||||
exit(subprocess.call(args, close_fds=False,
|
exit(subprocess.call(args, close_fds=False,
|
||||||
env=get_subprocess_env(options, gst_version)))
|
env=get_subprocess_env(options, gst_version)))
|
||||||
|
|
Loading…
Reference in a new issue