Module Name:    src
Committed By:   buhrow
Date:           Thu Mar 20 15:02:00 UTC 2025

Modified Files:
        src/bin/csh: err.c proc.c

Log Message:
Cause jobs -l to actually show process ID's again.
Thanks to rvp for the initial patch.
See: http://mail-index.NetBSD.org/current-users/2025/03/17/msg046284.html
for the full discussion of this fix.
-Brian


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/bin/csh/err.c
cvs rdiff -u -r1.42 -r1.43 src/bin/csh/proc.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/csh/err.c
diff -u src/bin/csh/err.c:1.25 src/bin/csh/err.c:1.26
--- src/bin/csh/err.c:1.25	Fri Apr  8 10:17:52 2022
+++ src/bin/csh/err.c	Thu Mar 20 15:02:00 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: err.c,v 1.25 2022/04/08 10:17:52 andvar Exp $ */
+/* $NetBSD: err.c,v 1.26 2025/03/20 15:02:00 buhrow Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)err.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: err.c,v 1.25 2022/04/08 10:17:52 andvar Exp $");
+__RCSID("$NetBSD: err.c,v 1.26 2025/03/20 15:02:00 buhrow Exp $");
 #endif
 #endif /* not lint */
 
@@ -171,7 +171,7 @@ static const char *errorlist[] =
 #define ERR_STRING	56
     "%s",
 #define ERR_JOBS	57
-    "usage: jobs [ -lZ ]",
+    "usage: jobs [-l|-Z [title]]",
 #define ERR_JOBARGS	58
     "Arguments should be jobs or process id's",
 #define ERR_JOBCUR	59

Index: src/bin/csh/proc.c
diff -u src/bin/csh/proc.c:1.42 src/bin/csh/proc.c:1.43
--- src/bin/csh/proc.c:1.42	Thu Sep 16 19:34:21 2021
+++ src/bin/csh/proc.c	Thu Mar 20 15:02:00 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.c,v 1.42 2021/09/16 19:34:21 christos Exp $ */
+/* $NetBSD: proc.c,v 1.43 2025/03/20 15:02:00 buhrow Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)proc.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: proc.c,v 1.42 2021/09/16 19:34:21 christos Exp $");
+__RCSID("$NetBSD: proc.c,v 1.43 2025/03/20 15:02:00 buhrow Exp $");
 #endif
 #endif /* not lint */
 
@@ -842,8 +842,7 @@ dojobs(Char **v, struct command *t)
     if (chkstop)
 	chkstop = 2;
     if (*++v) {
-	if (v[1]) {
-	    if (eq(*v, STRml)) {
+	    if (eq(*v, STRml) && !v[1]) {
 		flag |= FANCY | JOBDIR;
 	    } else if (eq(*v, STRmZ)) {
 		if (v[1] && v[1][0]) {
@@ -855,7 +854,6 @@ dojobs(Char **v, struct command *t)
 	    } else {
 		stderror(ERR_JOBS);
 	    }
-	}
     }
     for (i = 1; i <= pmaxindex; i++)
 	for (pp = proclist.p_next; pp; pp = pp->p_next)

Reply via email to