Module Name: src
Committed By: kre
Date: Wed May 3 21:31:03 UTC 2017
Modified Files:
src/bin/sh: jobs.c
Log Message:
Don't forget the ! reserved word exists (node ype NNOT) when displaying
"jobs" output (or other places where the cmd string is shown - like
when reporting status when a background job completes.)
Without this fix, try
! sleep 5 &
jobs
wait
and try not to wonder at the '???" that appears instead of "! sleep 5"
To generate a diff of this commit:
cvs rdiff -u -r1.80 -r1.81 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/jobs.c
diff -u src/bin/sh/jobs.c:1.80 src/bin/sh/jobs.c:1.81
--- src/bin/sh/jobs.c:1.80 Sat Apr 29 15:14:28 2017
+++ src/bin/sh/jobs.c Wed May 3 21:31:03 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: jobs.c,v 1.80 2017/04/29 15:14:28 kre Exp $ */
+/* $NetBSD: jobs.c,v 1.81 2017/05/03 21:31:03 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.80 2017/04/29 15:14:28 kre Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.81 2017/05/03 21:31:03 kre Exp $");
#endif
#endif /* not lint */
@@ -1275,6 +1275,10 @@ cmdtxt(union node *n)
cmdputs(" || ");
cmdtxt(n->nbinary.ch2);
break;
+ case NNOT:
+ cmdputs("! ");
+ cmdtxt(n->nnot.com);
+ break;
case NPIPE:
for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) {
cmdtxt(lp->n);