Subject: bin/2865: /bin/sh seems to have leftover debugging gunk (Easy Fix)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <abrown@eecs.harvard.edu>
List: netbsd-bugs
Date: 10/18/1996 21:01:47
>Number:         2865
>Category:       bin
>Synopsis:       Someone left a debugging printf in /bin/sh, creating weird output
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 18 18:05:04 1996
>Last-Modified:
>Originator:     Aaron Brown
>Organization:
Harvard University Computer Science
>Release:        NetBSD-current, 17 October 1996
>Environment:
Full build of world from 17 October sources

System: NetBSD abrown-2 1.2A NetBSD 1.2A (ABROWN) #22: Thu Oct 17 10:40:48 EDT 1996 abrown@abrown-2:/usr/src/sys/arch/sparc/compile/ABROWN sparc


>Description:
	When a command is not found, sh prints "here":

	$ foo
	here foo: not found
	$ 

>How-To-Repeat:
	run /bin/sh, feed it a non-existant command, watch its output
>Fix:
	Apply this one-line patch: <In the future, should I just commit
				    things like this myself?>

Index: exec.c
===================================================================
RCS file: /cvsroot/src/bin/sh/exec.c,v
retrieving revision 1.19
diff -c -r1.19 exec.c
*** exec.c	1996/10/16 14:35:45	1.19
--- exec.c	1996/10/19 00:57:16
***************
*** 536,542 ****
  	if (cmdp)
  		delete_cmd_entry();
  	if (printerr)
! 		outfmt(out2, "here %s: %s\n", name, errmsg(e, E_EXEC));
  	entry->cmdtype = CMDUNKNOWN;
  	return;
  
--- 536,542 ----
  	if (cmdp)
  		delete_cmd_entry();
  	if (printerr)
! 		outfmt(out2, "%s: %s\n", name, errmsg(e, E_EXEC));
  	entry->cmdtype = CMDUNKNOWN;
  	return;
  
>Audit-Trail:
>Unformatted: