fix: resolve SIGPIPE false negative in installer library detection#2
Merged
logabell merged 1 commit intologabell:mainfrom Mar 8, 2026
Merged
Conversation
`grep -q` exits immediately after the first match without consuming the rest of its input. When `ldconfig -p` is still writing to the pipe, this causes SIGPIPE (exit 141). Under the script's `set -o pipefail`, the pipeline returns 141 instead of 0, making `have_shared_lib_soname` report libraries as missing even when they are installed. Replace `grep -q` with `grep ... >/dev/null 2>&1` so grep reads all input before exiting, avoiding the broken pipe. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
criani
approved these changes
Mar 8, 2026
Owner
|
@asa-degroff Thank you for the PR, apologies for they delay in implementation. The new release 0.1.14 includes this change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
have_shared_lib_sonameusesldconfig -p | grep -qto detect system libraries.grep -qexits on first match without consuming remaining input, which sends SIGPIPE toldconfig -p(exit 141). Underset -o pipefail, the pipeline returns 141 instead of 0, causing the installer to report libraries as missing even when they are installed.grep -q "$soname"withgrep "$soname" >/dev/null 2>&1so thatgrepconsumes all ofldconfig's output before exiting, avoiding the broken pipe.Reproduction
Observed on Fedora 43 (glibc 2.41, bash 5.2, ldconfig cache ~1800 entries).
Test plan
bash -c 'set -euo pipefail; source install.sh'library detection on a system with appindicator installed — should now passinstall.shon a clean Fedora 40+/Ubuntu 24.04+ system🤖 Generated with Claude Code