Module Name:    src
Committed By:   kre
Date:           Fri Sep 29 17:53:57 UTC 2017

Modified Files:
        src/bin/sh: eval.c jobs.c

Log Message:
DEBUG only changes (non-debug, ie: normal, shell unaffected)
Add a little extra info in a few of the trace messages.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/bin/sh/eval.c
cvs rdiff -u -r1.88 -r1.89 src/bin/sh/jobs.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.151 src/bin/sh/eval.c:1.152
--- src/bin/sh/eval.c:1.151	Fri Jun 30 23:01:21 2017
+++ src/bin/sh/eval.c	Fri Sep 29 17:53:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.151 2017/06/30 23:01:21 kre Exp $	*/
+/*	$NetBSD: eval.c,v 1.152 2017/09/29 17:53:57 kre Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.151 2017/06/30 23:01:21 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.152 2017/09/29 17:53:57 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -1056,7 +1056,8 @@ evalcommand(union node *cmd, int flgs, s
 	/* Execute the command. */
 	switch (cmdentry.cmdtype) {
 	case CMDFUNCTION:
-		VXTRACE(DBG_EVAL, ("Shell function:  "), trargs(argv));
+		VXTRACE(DBG_EVAL, ("Shell function%s:  ",vforked?" VF":""),
+		    trargs(argv));
 		redirect(cmd->ncmd.redirect, flags & EV_MORE ? REDIR_PUSH : 0);
 		saveparam = shellparam;
 		shellparam.malloc = 0;
@@ -1126,7 +1127,7 @@ evalcommand(union node *cmd, int flgs, s
 
 	case CMDBUILTIN:
 	case CMDSPLBLTIN:
-		VXTRACE(DBG_EVAL, ("builtin command:  "), trargs(argv));
+		VXTRACE(DBG_EVAL, ("builtin command%s:  ",vforked?" VF":""), trargs(argv));
 		mode = (cmdentry.u.bltin == execcmd) ? 0 : REDIR_PUSH;
 		if (flags == EV_BACKCMD) {
 			memout.nleft = 0;
@@ -1204,7 +1205,8 @@ evalcommand(union node *cmd, int flgs, s
 		break;
 
 	default:
-		VXTRACE(DBG_EVAL, ("normal command:  "), trargs(argv));
+		VXTRACE(DBG_EVAL, ("normal command%s:  ", vforked?" VF":""),
+		    trargs(argv));
 		redirect(cmd->ncmd.redirect, 
 		    (vforked ? REDIR_VFORK : 0) | REDIR_KEEP);
 		if (!vforked)

Index: src/bin/sh/jobs.c
diff -u src/bin/sh/jobs.c:1.88 src/bin/sh/jobs.c:1.89
--- src/bin/sh/jobs.c:1.88	Mon Jul 24 14:17:11 2017
+++ src/bin/sh/jobs.c	Fri Sep 29 17:53:57 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: jobs.c,v 1.88 2017/07/24 14:17:11 kre Exp $	*/
+/*	$NetBSD: jobs.c,v 1.89 2017/09/29 17:53:57 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)jobs.c	8.5 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: jobs.c,v 1.88 2017/07/24 14:17:11 kre Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.89 2017/09/29 17:53:57 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -913,7 +913,7 @@ forkparent(struct job *jp, union node *n
 		if (/* iflag && rootshell && */ n)
 			commandtext(ps, n);
 	}
-	CTRACE(DBG_JOBS, ("In parent shell:  child = %d\n", pid));
+	CTRACE(DBG_JOBS, ("In parent shell: child = %d (mode %d)\n",pid,mode));
 	return pid;
 }
 
@@ -926,7 +926,7 @@ forkchild(struct job *jp, union node *n,
 	const char *nullerr = "Can't open %s";
 
 	wasroot = rootshell;
-	CTRACE(DBG_JOBS, ("Child shell %d\n", getpid()));
+	CTRACE(DBG_JOBS, ("Child shell %d%s\n",getpid(),vforked?" vforked":""));
 	if (!vforked)
 		rootshell = 0;
 

Reply via email to