Subject: bin/36531: another very helpful DEBUG TRACE() call for execve() failures in /bin/sh
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Greg A. Woods <woods@planix.com>
List: netbsd-bugs
Date: 06/23/2007 18:55:00
>Number:         36531
>Category:       bin
>Synopsis:       another very helpful DEBUG TRACE() call for execve() failures in /bin/sh
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 23 18:55:00 +0000 2007
>Originator:     Greg A. Woods
>Release:        netbsd-4 2007/06/22
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:
	
	
System: NetBSD 
>Description:

	another very helpful DEBUG TRACE() call for execve() failures in
	/bin/sh

>How-To-Repeat:

>Fix:

Index: bin/sh/exec.c
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/bin/sh/exec.c,v
retrieving revision 1.39
diff -u -r1.39 exec.c
--- bin/sh/exec.c	18 Mar 2006 05:23:08 -0000	1.39
+++ bin/sh/exec.c	10 Feb 2007 17:17:09 -0000
@@ -179,6 +179,9 @@
 			 */
 			exraise(EXSHELLPROC);
 		}
+#ifdef DEBUG
+		TRACE(("execve(cmd=%s) returned ENOEXEC\n", cmd));
+#endif
 		initshellproc();
 		setinputfile(cmd, 0);
 		commandname = arg0 = savestr(argv[0]);

>Unformatted: