From: Timo Sirainen Date: Thu, 23 Mar 2023 23:53:43 +0000 (+0200) Subject: master: Set VERBOSE_PROCTITLE environment to child processes X-Git-Tag: 2.3.21~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c7cf91d8633c7dfbbb98ba9c7410b6a81a04f0fe;p=thirdparty%2Fdovecot%2Fcore.git master: Set VERBOSE_PROCTITLE environment to child processes This is needed for updating process title during initialization before settings are read. --- 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);