Module Name: src
Committed By: christos
Date: Thu Sep 16 19:34:21 UTC 2021
Modified Files:
src/bin/csh: proc.c
Log Message:
provide a way to reset setproctitle.
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 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/proc.c
diff -u src/bin/csh/proc.c:1.41 src/bin/csh/proc.c:1.42
--- src/bin/csh/proc.c:1.41 Sat Sep 11 16:55:03 2021
+++ src/bin/csh/proc.c Thu Sep 16 15:34:21 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.c,v 1.41 2021/09/11 20:55:03 christos Exp $ */
+/* $NetBSD: proc.c,v 1.42 2021/09/16 19:34:21 christos 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.41 2021/09/11 20:55:03 christos Exp $");
+__RCSID("$NetBSD: proc.c,v 1.42 2021/09/16 19:34:21 christos Exp $");
#endif
#endif /* not lint */
@@ -845,8 +845,12 @@ dojobs(Char **v, struct command *t)
if (v[1]) {
if (eq(*v, STRml)) {
flag |= FANCY | JOBDIR;
- } else if (eq(*v, STRmZ) && v[1]) {
- setproctitle("%s", short2str(v[1]));
+ } else if (eq(*v, STRmZ)) {
+ if (v[1] && v[1][0]) {
+ setproctitle("%s", short2str(v[1]));
+ } else {
+ setproctitle(NULL);
+ }
return;
} else {
stderror(ERR_JOBS);