diff options
author | brian <brian@FreeBSD.org> | 2000-08-09 10:22:48 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-08-09 10:22:48 +0000 |
commit | f77ad6d1afa9ae953e2850a8b55f55b158275dcf (patch) | |
tree | 09f5b0999cac814b37f2c8046d8bc27058d434fc | |
parent | 3193d19dd6ec8ef532d49d49bc46e829bca516cc (diff) | |
download | FreeBSD-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().
-rw-r--r-- | usr.sbin/ppp/id.c | 5 |
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(); |