From ba6c8e51bee7a858852e18d29e52c8d5e567e0a0 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 19 Jul 2017 15:22:40 +0300 Subject: [PATCH] The master process title has been renamed to "main" process. The command line is enclosed in brackets. --- src/nxt_master_process.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/nxt_master_process.c b/src/nxt_master_process.c index aea9ee59..a243a671 100644 --- a/src/nxt_master_process.c +++ b/src/nxt_master_process.c @@ -248,17 +248,21 @@ nxt_master_process_title(nxt_task_t *task) nxt_uint_t i; u_char title[2048]; - end = title + sizeof(title); + end = title + sizeof(title) - 1; - p = nxt_sprintf(title, end, "nginext: master %s", nxt_process_argv[0]); + p = nxt_sprintf(title, end, "nginext: main [%s", nxt_process_argv[0]); for (i = 1; nxt_process_argv[i] != NULL; i++) { p = nxt_sprintf(p, end, " %s", nxt_process_argv[i]); } + if (p < end) { + *p++ = ']'; + } + *p = '\0'; - nxt_process_title(task, "%s", (char *) title); + nxt_process_title(task, "%s", title); }