From c0cc2fda7040bc5d3e36121123efb2125a8c6c13 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Sat, 11 Jul 2026 09:22:49 -0400 Subject: [PATCH] firefox: fix flaky dylib check due to SIGPIPE race The `otool ... | grep -q ...` pipeline sometimes fails with PIPESTATUS=141 because of SIGPIPE race. It happens because `grep -q` doesn't drain the pipe but exits on first match. If it exists before `otool` writes its last line to stdout, `otool` fails on write. It makes the whole dylib check fail. This results in a symlink left pointing to a dylib file instead of copying it, which may break the app. The solution is to drain the pipeline with `grep -F`. --- pkgs/applications/networking/browsers/firefox/wrapper.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 149a3f13e54d..e46fb7b8fc12 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -434,7 +434,7 @@ let ;; *) # Copy if the symlink resolves to a Mach-O dylib - otool -l "$file" 2>/dev/null | grep -q 'LC_ID_DYLIB' || continue + otool -l "$file" 2>/dev/null | grep -F 'LC_ID_DYLIB' >/dev/null || continue ;; esac