* [PATCH] scripts: run-clang-tools: import os for broken pipe handling
@ 2026-09-28 23:47 omer zalman
2026-09-29 20:23 ` Nathan Chancellor
0 siblings, 1 reply; 2+ messages in thread
From: omer zalman @ 2026-09-28 23:47 UTC (permalink / raw)
To: Nathan Chancellor; +Cc: nsc, llvm, linux-kbuild, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 401 bytes --]
The BrokenPipeError handler calls os.open() and os.dup2(), but the
module never imports os. A broken output pipe therefore raises
NameError while handling the original error. Import os so the
handler can redirect stdout and exit as intended.
Signed-off-by: Omer Zalman <omerzalman42@gmail.com>
The exact git-format-patch file is attached because Gmail's web
composer removes tabs from inline diffs.
[-- Attachment #2: 05-run-clang-tools-broken-pipe.patch --]
[-- Type: application/octet-stream, Size: 1165 bytes --]
From df5af4db02aa9678b106f0274913fb0b18c0cce6 Mon Sep 17 00:00:00 2001
From: Omer Zalman <omerzalman42@gmail.com>
Date: Sun, 27 Sep 2026 08:41:10 -0400
Subject: [PATCH] scripts: run-clang-tools: import os for broken pipe handling
To: Nathan Chancellor <nathan@kernel.org>
Cc: Nicolas Schier <nsc@kernel.org>, llvm@lists.linux.dev, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
From: Omer Zalman <omerzalman42@gmail.com>
The BrokenPipeError handler calls os.open() and os.dup2(), but the
module never imports os. A broken output pipe therefore raises
NameError while handling the original error. Import os so the
handler can redirect stdout and exit as intended.
Signed-off-by: Omer Zalman <omerzalman42@gmail.com>
---
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 100644
--- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] scripts: run-clang-tools: import os for broken pipe handling
2026-09-28 23:47 [PATCH] scripts: run-clang-tools: import os for broken pipe handling omer zalman
@ 2026-09-29 20:23 ` Nathan Chancellor
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2026-09-29 20:23 UTC (permalink / raw)
To: omer zalman; +Cc: nsc, llvm, linux-kbuild, linux-kernel
Hi Omer,
On Mon, Sep 28, 2026 at 07:47:14PM -0400, omer zalman wrote:
> The BrokenPipeError handler calls os.open() and os.dup2(), but the
> module never imports os. A broken output pipe therefore raises
> NameError while handling the original error. Import os so the
> handler can redirect stdout and exit as intended.
>
> Signed-off-by: Omer Zalman <omerzalman42@gmail.com>
>
> The exact git-format-patch file is attached because Gmail's web
> composer removes tabs from inline diffs.
As folks have mentioned on your other patches, you need to send your
patch using either git send-email or b4 so that they can be properly
handled by our tools, an attachment will not cut it.
Additionally, was this change inspired or developed by an LLM/agent? I
only ask because this has been broken for ages and you and another
person sent basically the same patch within a week of each other.
https://lore.kernel.org/179017337986.52388.7943687183785012868@gmail.com/
Odd coincidence if not. If so, please follow our coding assistants
documentation:
https://docs.kernel.org/process/coding-assistants.html
--
Cheers,
Nathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-29 20:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 23:47 [PATCH] scripts: run-clang-tools: import os for broken pipe handling omer zalman
2026-09-29 20:23 ` Nathan Chancellor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox