summaryrefslogtreecommitdiff
path: root/src/stdbuf.c
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2011-09-01 15:23:17 +0100
committerPádraig Brady <P@draigBrady.com>2011-09-01 15:27:58 +0100
commit197cd0994d93ea650efb86a4290e09a0fc63384f (patch)
tree922cb0c862c176bd04854349c7a4427fa4cc171f /src/stdbuf.c
parent0d89a42bff15d80574190537cc47f2f0aba24830 (diff)
downloadcoreutils-197cd0994d93ea650efb86a4290e09a0fc63384f.tar.xz
stdbuf: fix helper lib identification on some platforms
* src/stdbuf.c (main): Pass the path of `stdbuf` rather than the command it's running to the search function. This is significant on platforms without /proc/self/exe Reported by Bruno Haible
Diffstat (limited to 'src/stdbuf.c')
-rw-r--r--src/stdbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdbuf.c b/src/stdbuf.c
index 6fd803c95..0e2006b92 100644
--- a/src/stdbuf.c
+++ b/src/stdbuf.c
@@ -354,7 +354,7 @@ main (int argc, char **argv)
/* Try to preload libstdbuf first from the same path as
stdbuf is running from. */
- set_program_path (argv[0]);
+ set_program_path (program_name);
if (!program_path)
program_path = xstrdup (PKGLIBDIR); /* Need to init to non NULL. */
set_LD_PRELOAD ();