mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] clang-tools: Import os for broken pipe handling
@ 2026-10-09 17:58 Ting-Han Hou
  2026-10-09 20:41 ` Nathan Chancellor
  0 siblings, 1 reply; 2+ messages in thread
From: Ting-Han Hou @ 2026-10-09 17:58 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier
  Cc: Nick Desaulniers, Bill Wendling, Justin Stitt, llvm,
	linux-kbuild, linux-kernel

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@gmail.com>
---
Changes in v2:
- Drop the regression test and adjust the commit message (Nathan)
- Use my full name in the Signed-off-by
- v1: https://lore.kernel.org/r/179017337986.52388.7943687183785012868@gmail.com/

Sorry for the mangled resend in the meantime; this one is sent with
git send-email.

 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-09 20:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 17:58 [PATCH v2] clang-tools: Import os for broken pipe handling Ting-Han Hou
2026-10-09 20:41 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®