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

* Re: [PATCH v2] clang-tools: Import os for broken pipe handling
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2026-10-09 20:41 UTC (permalink / raw)
  To: Nicolas Schier, Ting-Han Hou
  Cc: Nick Desaulniers, Bill Wendling, Justin Stitt, llvm,
	linux-kbuild, linux-kernel

On Sat, 10 Oct 2026 01:58:32 +0800, Ting-Han Hou wrote:
> clang-tools: Import os for broken pipe handling

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-next-unstable

Thanks!

[1/1] clang-tools: Import os for broken pipe handling
      https://git.kernel.org/kbuild/c/d26ab84593e63

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

Best regards,
-- 
Cheers,
Nathan



^ 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®