Re: [PATCH] clang-tools: Import os for broken pipe handling
From: Nathan Chancellor
Date: Tue Sep 29 2026 - 16:00:07 EST
On 2026-09-26 08:52 +0800, 14侯廷翰 wrote:
> 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
Your patch is mangled, so it cannot be applied (maybe you send it with a
different client from your v1?). Please resend properly.
--
Cheers,
Nathan