diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt index f3fcc8c2983a4c..8e561a55c36935 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/stub_template.txt @@ -109,7 +109,7 @@ def Main(): try: sys.stdout.flush() - exit(subprocess.call(args)) + os.execv(args[0], args) except EnvironmentError as e: # This exception occurs when os.execv() fails for some reason. if not getattr(e, 'filename', None):