[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-8.12.178-df9cd on OpenBSD 4.9

From: Pádraig Brady
Subject: Re: coreutils-8.12.178-df9cd on OpenBSD 4.9
Date: Thu, 01 Sep 2011 12:42:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0

On 09/01/2011 09:37 AM, Bruno Haible wrote:
> FAIL: misc/stdbuf (exit: 1)
> ===========================
> stdbuf: invalid mode `l'
> stdbuf: invalid mode `4294967296': Value too large to be stored in data type
> stdbuf: line buffering stdin is meaningless
> Try `stdbuf --help' for more information.
> stdbuf: failed to run command `.': Is a directory
> stdbuf: failed to find `'

Eek, that's a bug exposed on systems without /proc/self/exe
This should fix it:

diff --git a/src/stdbuf.c b/src/stdbuf.c
index 6fd803c..0e2006b 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 ();


reply via email to

[Prev in Thread] Current Thread [Next in Thread]