From 4e9d6a7fc506ed62e2c122b87ec47ba37bb8bf64 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Wed, 9 Aug 2000 10:22:48 +0000 Subject: [PATCH] If the first character of the ``set title'' argument is `-', put it into the format string, supporting ps's tweak to setproctitle(). --- usr.sbin/ppp/id.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/id.c b/usr.sbin/ppp/id.c index a1247762ad8..7f99a8a6494 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();