From 1a804a40552ead5a6c5dbe108720802026f0979b Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 13 Oct 2025 15:59:53 +0300 Subject: [PATCH] imap: Don't update proctitle to [unhibernating] if verbose_proctitle=no --- src/imap/imap-common.h | 1 + src/imap/imap-master-client.c | 3 ++- src/imap/main.c | 2 +- src/imap/test-imap-client-hibernate.c | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/imap/imap-common.h b/src/imap/imap-common.h index 4cb236799b..42c3f6fc84 100644 --- a/src/imap/imap-common.h +++ b/src/imap/imap-common.h @@ -23,6 +23,7 @@ typedef void imap_client_created_func_t(struct client **client); extern imap_client_created_func_t *hook_client_created; extern bool imap_debug; +extern bool verbose_proctitle; extern struct event_category event_category_imap; /* Sets the hook_client_created and returns the previous hook, diff --git a/src/imap/imap-master-client.c b/src/imap/imap-master-client.c index 952c085f92..9ae429e5cd 100644 --- a/src/imap/imap-master-client.c +++ b/src/imap/imap-master-client.c @@ -311,7 +311,8 @@ imap_master_client_input_args(struct connection *conn, const char *const *args, i_close_fd(&fd_client); return -1; } - process_title_set("[unhibernating]"); + if (verbose_proctitle) + process_title_set("[unhibernating]"); /* NOTE: before client_create_from_input() on failures we need to close fd_client, but afterward it gets closed by client_destroy() */ diff --git a/src/imap/main.c b/src/imap/main.c index b4c9fc546e..c0771fc8f1 100644 --- a/src/imap/main.c +++ b/src/imap/main.c @@ -34,13 +34,13 @@ #define IMAP_DIE_IDLE_SECS 10 -static bool verbose_proctitle = FALSE; static struct mail_storage_service_ctx *storage_service; static struct login_server *login_server = NULL; static struct timeout *to_proctitle; imap_client_created_func_t *hook_client_created = NULL; bool imap_debug = FALSE; +bool verbose_proctitle = FALSE; struct event_category event_category_imap = { .name = "imap", diff --git a/src/imap/test-imap-client-hibernate.c b/src/imap/test-imap-client-hibernate.c index 1c04d26aef..6ba3ad0248 100644 --- a/src/imap/test-imap-client-hibernate.c +++ b/src/imap/test-imap-client-hibernate.c @@ -34,6 +34,7 @@ struct test_imap_client_hibernate { imap_client_created_func_t *hook_client_created = NULL; bool imap_debug = FALSE; +bool verbose_proctitle = FALSE; static const char *tmpdir; static struct mail_storage_service_ctx *storage_service; -- 2.47.3