This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Use correct exit status in ldd (bug 24150)
- From: Andreas Schwab <schwab at suse dot de>
- To: libc-alpha at sourceware dot org
- Date: Mon, 03 Feb 2020 12:25:11 +0100
- Subject: [PATCH] Use correct exit status in ldd (bug 24150)
The message "not a dynamic executable" is not an error, so don't exit with
a nonzero status.
---
elf/ldd.bash.in | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index 467cbf44e9..a879ddd640 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -166,10 +166,7 @@ warning: you do not have execution permission for" "\`$file'" >&2
case $ret in
1)
# This can be a non-ELF binary or no binary at all.
- nonelf "$file" || {
- echo $" not a dynamic executable" >&2
- result=1
- }
+ nonelf "$file" || echo $" not a dynamic executable"
;;
0|2)
try_trace "$RTLD" "$file" || result=1
--
2.25.0
--
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."