code: def _execvp(cmd: str, argv: list[str]) -> None:
      """execvp, except on Windows where it uses Popen
  
      Python provides execvp on Windows, but its behavior is problematic (Python bug#9148).
      """
      if sys.platform.startswith("win"):
          # PATH is ignored when shell=False,
          # so rely on shutil.which
          cmd_path = which(cmd)
          if cmd_path is None:
              raise OSError("%r not found" % cmd, errno.ENOENT)
          p = Popen([cmd_path] + argv[1:])  # noqa: S603
          # Don't raise KeyboardInterrupt in the parent process.
          # Set this after spawning, to avoid subprocess inheriting handler.
          import signal
  
          signal.signal(signal.SIGINT, signal.SIG_IGN)
          p.wait()
          sys.exit(p.returncode)
      else:
          os.execvp(cmd, argv)
  
imports: from __future__ import annotations
  import argparse
  import errno
  import json
  import os
  import site
  import sys
  import sysconfig
  from pathlib import Path
  from shutil import which
  from subprocess import Popen
  from typing import Any
  from .None import paths
  from .version import __version__
label_desc: Use image node_id 3 for calling a global function with example usage: _execvp(cmd, argv) without return types