From c7cf91d8633c7dfbbb98ba9c7410b6a81a04f0fe Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 24 Mar 2023 01:53:43 +0200 Subject: [PATCH] master: Set VERBOSE_PROCTITLE environment to child processes This is needed for updating process title during initialization before settings are read. --- src/lib-master/master-interface.h | 4 ++++ src/master/service-process.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/lib-master/master-interface.h b/src/lib-master/master-interface.h index e5db7ce720..befeab057b 100644 --- a/src/lib-master/master-interface.h +++ b/src/lib-master/master-interface.h @@ -66,6 +66,10 @@ enum master_login_state { /* getenv(MASTER_CONFIG_FILE_ENV) provides path to configuration file/socket */ #define MASTER_CONFIG_FILE_ENV "CONFIG_FILE" +/* getenv(MASTER_VERBOSE_PROCTITLE_ENV) is non-NULL if verbose_proctitle=yes. + This is used by lib-master during initialization. */ +#define MASTER_VERBOSE_PROCTITLE_ENV "VERBOSE_PROCTITLE" + /* getenv(MASTER_DOVECOT_VERSION_ENV) provides master's version number (unset if version_ignore=yes) */ #define MASTER_DOVECOT_VERSION_ENV "DOVECOT_VERSION" diff --git a/src/master/service-process.c b/src/master/service-process.c index 3d830d5911..24e68bf83e 100644 --- a/src/master/service-process.c +++ b/src/master/service-process.c @@ -260,6 +260,8 @@ service_process_setup_environment(struct service *service, unsigned int uid, env_put(MY_HOSTNAME_ENV, my_hostname); env_put(MY_HOSTDOMAIN_ENV, hostdomain); + if (service_set->verbose_proctitle) + env_put(MASTER_VERBOSE_PROCTITLE_ENV, "1"); if (!service->set->master_set->version_ignore) env_put(MASTER_DOVECOT_VERSION_ENV, PACKAGE_VERSION); -- 2.47.3