Source-Changes-HG archive

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

[src/trunk]: src/bin/sh Slightly improve "jobs" command output in cases where...



details:   https://anonhg.NetBSD.org/src/rev/f675728349c1
branches:  trunk
changeset: 815246:f675728349c1
user:      kre <kre%NetBSD.org@localhost>
date:      Sat May 07 20:07:47 2016 +0000

description:
Slightly improve "jobs" command output in cases where a job includes
embedded background commands or pipelines.   (just slightly...)
OK christos@

diffstat:

 bin/sh/jobs.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r 9206fda69b8f -r f675728349c1 bin/sh/jobs.c
--- a/bin/sh/jobs.c     Sat May 07 20:06:30 2016 +0000
+++ b/bin/sh/jobs.c     Sat May 07 20:07:47 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jobs.c,v 1.78 2016/05/03 23:55:12 kre Exp $    */
+/*     $NetBSD: jobs.c,v 1.79 2016/05/07 20:07:47 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.78 2016/05/03 23:55:12 kre Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.79 2016/05/07 20:07:47 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -1284,6 +1284,8 @@
                        if (lp->next)
                                cmdputs(" | ");
                }
+               if (n->npipe.backgnd)
+                       cmdputs(" &");
                break;
        case NSUBSHELL:
                cmdputs("(");
@@ -1344,6 +1346,8 @@
        case NCMD:
                cmdlist(n->ncmd.args, 1);
                cmdlist(n->ncmd.redirect, 0);
+               if (n->ncmd.backgnd)
+                       cmdputs(" &");
                break;
        case NARG:
                cmdputs(n->narg.text);



Home | Main Index | Thread Index | Old Index