[PATCH] clang-tools: Import os for broken pipe handling
From: 14侯廷翰
Date: Fri Sep 25 2026 - 20:57:35 EST
From: Ting-Han Hou <ue081723@xxxxxxxxx>
The BrokenPipeError handler in run-clang-tools.py calls os.open() and
os.dup2() without importing os. If this handler is reached, it raises
NameError instead of redirecting stdout and exiting with status 1.
Import os so the handler can work as intended.
Fixes: 87c7ee67deb7 ("scripts: handle BrokenPipeError for python scripts")
Assisted-by: LLM
Signed-off-by: Ting-Han Hou <ue081723@xxxxxxxxx>
---
scripts/clang-tools/run-clang-tools.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/clang-tools/run-clang-tools.py
b/scripts/clang-tools/run-clang-tools.py
index e78be82..79d58b3 100755
--- a/scripts/clang-tools/run-clang-tools.py
+++ b/scripts/clang-tools/run-clang-tools.py
@@ -12,6 +12,7 @@ compile_commands.json.
import argparse
import json
import multiprocessing
+import os
import subprocess
import sys
base-commit: fe2ec83746e501645709761605c2464a44fd2929
--
2.52.0.windows.1