use os._exit() (#2295)

pull/2296/head
OBarronCS 1 year ago committed by GitHub
parent b0f42a6c8b
commit b74fcdde97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -165,7 +165,8 @@ def main() -> None:
venv_path = get_venv_path(src_root) venv_path = get_venv_path(src_root)
if not venv_path.exists(): if not venv_path.exists():
print(f"Cannot find Pwndbg virtualenv directory: {venv_path}. Please re-run setup.sh") print(f"Cannot find Pwndbg virtualenv directory: {venv_path}. Please re-run setup.sh")
sys.exit(1) sys.stdout.flush()
os._exit(1)
update_deps(src_root, venv_path) update_deps(src_root, venv_path)
fixup_paths(src_root, venv_path) fixup_paths(src_root, venv_path)
@ -203,4 +204,5 @@ try:
except Exception: except Exception:
print(traceback.format_exc(), file=sys.stderr) print(traceback.format_exc(), file=sys.stderr)
sys.exit(1) sys.stdout.flush()
os._exit(1)

@ -24,7 +24,8 @@ rv = pytest.main(["--collect-only", TESTS_PATH], plugins=[collector])
if rv == pytest.ExitCode.INTERRUPTED: if rv == pytest.ExitCode.INTERRUPTED:
print("Failed to collect all tests, perhaps there is a syntax error in one of test files?") print("Failed to collect all tests, perhaps there is a syntax error in one of test files?")
sys.exit(1) sys.stdout.flush()
os._exit(1)
print("Listing collected tests:") print("Listing collected tests:")
@ -32,4 +33,5 @@ for nodeid in collector.collected:
print("Test:", nodeid) print("Test:", nodeid)
# easy way to exit GDB session # easy way to exit GDB session
sys.exit(0) sys.stdout.flush()
os._exit(0)

@ -24,7 +24,8 @@ rv = pytest.main(["--collect-only", TESTS_PATH], plugins=[collector])
if rv == pytest.ExitCode.INTERRUPTED: if rv == pytest.ExitCode.INTERRUPTED:
print("Failed to collect all tests, perhaps there is a syntax error in one of test files?") print("Failed to collect all tests, perhaps there is a syntax error in one of test files?")
sys.exit(1) sys.stdout.flush()
os._exit(1)
print("Listing collected tests:") print("Listing collected tests:")

Loading…
Cancel
Save