def METHOD_NAME(executable, cmd, **kwargs):
    # pylint: disable=protected-access
    main_thread = isinstance(
        threading.current_thread(),
        threading._MainThread,  # type: ignore[attr-defined]
    )
    old_handler = None
    exec_cmd = _make_cmd(executable, cmd)
    try:
        p = subprocess.Popen(exec_cmd, **kwargs)  # nosec B603 # noqa: S603
        if main_thread:
            old_handler = signal.signal(signal.SIGINT, signal.SIG_IGN)
        p.communicate()
        if p.returncode != 0:
            raise StageCmdFailedError(cmd, p.returncode)
    finally:
        if old_handler:
            signal.signal(signal.SIGINT, old_handler)