If the first character of the `set title'' argument is -',

put it into the format string, supporting ps's tweak to
setproctitle().
This commit is contained in:
brian 2000-08-09 10:22:48 +00:00
parent 349204cba8
commit 72e90d64d2

View File

@ -281,7 +281,10 @@ ID0setproctitle(const char *title)
setproctitle(NULL); setproctitle(NULL);
log_Printf(LogID0, "setproctitle(NULL)\n"); log_Printf(LogID0, "setproctitle(NULL)\n");
} else { } 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); log_Printf(LogID0, "setproctitle(\"%%s\", \"%s\")\n", title);
} }
ID0setuser(); ID0setuser();