summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2000-08-09 10:22:48 +0000
committerbrian <brian@FreeBSD.org>2000-08-09 10:22:48 +0000
commitf77ad6d1afa9ae953e2850a8b55f55b158275dcf (patch)
tree09f5b0999cac814b37f2c8046d8bc27058d434fc /usr.sbin/ppp
parent3193d19dd6ec8ef532d49d49bc46e829bca516cc (diff)
downloadFreeBSD-src-f77ad6d1afa9ae953e2850a8b55f55b158275dcf.zip
FreeBSD-src-f77ad6d1afa9ae953e2850a8b55f55b158275dcf.tar.gz
If the first character of the ``set title'' argument is `-',
put it into the format string, supporting ps's tweak to setproctitle().
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/id.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c
index a124776..7f99a8a 100644
--- a/usr.sbin/ppp/id.c
+++ b/usr.sbin/ppp/id.c
@@ -281,7 +281,10 @@ ID0setproctitle(const char *title)
setproctitle(NULL);
log_Printf(LogID0, "setproctitle(NULL)\n");
} else {
- setproctitle("%s", title);
+ if (title[0] == '-' && title[1] != '\0')
+ setproctitle("-%s", title + 1);
+ else
+ setproctitle("%s", title);
log_Printf(LogID0, "setproctitle(\"%%s\", \"%s\")\n", title);
}
ID0setuser();
OpenPOWER on IntegriCloud