On Mon, 17 Mar 2025, Brian Buhrow wrote:
I noticed recently that if I have some background processes in csh sessions, if I type: jobs -l I no longer get the process ID's associated with the convenient job numbers.
Got broken in: cvs rdiff -u -r1.40 -r1.41 src/bin/csh/proc.c Patch: ``` diff -urN a/src/bin/csh/err.c b/src/bin/csh/err.c --- a/src/bin/csh/err.c 2022-04-08 10:17:52.000000000 +0000 +++ b/src/bin/csh/err.c 2025-03-18 04:31:04.359583932 +0000 @@ -171,7 +171,7 @@ #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 diff -urN a/src/bin/csh/proc.c b/src/bin/csh/proc.c --- a/src/bin/csh/proc.c 2021-09-16 19:34:21.000000000 +0000 +++ b/src/bin/csh/proc.c 2025-03-18 04:12:46.363000567 +0000 @@ -842,19 +842,17 @@ if (chkstop) chkstop = 2; if (*++v) { - if (v[1]) { - if (eq(*v, STRml)) { - flag |= FANCY | JOBDIR; - } else if (eq(*v, STRmZ)) { - if (v[1] && v[1][0]) { - setproctitle("%s", short2str(v[1])); - } else { - setproctitle(NULL); - } - return; + if (eq(*v, STRml) && !v[1]) { + flag |= FANCY | JOBDIR; + } else if (eq(*v, STRmZ)) { + if (v[1] && v[1][0]) { + setproctitle("%s", short2str(v[1])); } else { - stderror(ERR_JOBS); + setproctitle(NULL); } + return; + } else { + stderror(ERR_JOBS); } } for (i = 1; i <= pmaxindex; i++) ``` (Patch looks larger than it ought to be owing to whitespace changes--it really is quite small: remove an enclosing test; add back an original check.) -RVP