mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
7bdb026118
commit
4e9d6a7fc5
1 changed files with 4 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue