bug-bash
[Top][All Lists]
Advanced

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

hash diagnostic should go to stderr


From: llattanzi+bash
Subject: hash diagnostic should go to stderr
Date: Mon, 19 Jul 2004 11:38:19 -0700 (PDT)

Configuration Information [Automatically generated, do not change]:
Machine: powerpc
OS: darwin8.0
Compiler: gcc
Compilation CFLAGS: -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc' -DCONF_OSTYPE='darwin8.0' -DCONF_MACHTYPE='powerpc-apple-darwin8.0' -DCONF_VENDOR='apple' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I/SourceCache/bash/bash-32/bash -I/SourceCache/bash/bash-32/bash/include -I/SourceCache/bash/bash-32/bash/lib -arch i386 -arch ppc -g -Os -pipe -no-cpp-precomp -arch i386 -arch ppc -pipe uname output: Darwin stderr.apple.com 8.0.0b1 Darwin Kernel Version 8.0.0b1: Mon Jul 12 21:41:56 PDT 2004; root:xnu/xnu-638.1.obj~4/RELEASE_PPC Power Macintosh powerpc
Machine Type: powerpc-apple-darwin8.0

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        hash -r; hash > stdout #generates non-empty output

Fix:
Index: bash/bash/builtins/hash.def
diff -u bash/bash/builtins/hash.def:1.1.1.4 bash/bash/builtins/hash.def:1.1.1.4.44.1
--- bash/bash/builtins/hash.def:1.1.1.4 Sat Apr  5 00:00:28 2003
+++ bash/bash/builtins/hash.def Mon Jul 19 11:36:33 2004
@@ -59,6 +59,7 @@
 #include "bashgetopt.h"

 extern int dot_found_in_search;
+extern int posixly_correct;
 extern char *this_command_name;

 static int add_hashed_command __P((char *, int));
@@ -124,7 +125,7 @@
   if (list == 0 && expunge_hash_table == 0)
     {
       if (print_hashed_commands (list_portably) == 0)
-       printf ("%s: hash table empty\n", this_command_name);
+ fprintf (posixly_correct ? stderr : stdout, "%s: hash table empty\n", this_command_name);

       return (EXECUTION_SUCCESS);
     }





reply via email to

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