]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm: Flush print output after processing each user
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 2 Dec 2025 11:11:20 +0000 (13:11 +0200)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Tue, 2 Dec 2025 11:11:20 +0000 (13:11 +0200)
Otherwise when processing many users, the print output wouldn't be flushed
until enough output had been written. If there wasn't much written, it
could have taken a long time to see anything printed.

src/doveadm/doveadm-mail.c

index 3e5b461bfb7aa27b2555e3f76f7fe4b67585450a..fe315068be85eb095ffae7236be2373e2dc323d0 100644 (file)
@@ -577,6 +577,7 @@ doveadm_mail_all_users(struct doveadm_mail_cmd_context *ctx,
                cctx->username = user;
                T_BEGIN {
                        ret = doveadm_mail_next_user(ctx, &error);
+                       doveadm_print_flush();
                        if (ret < 0)
                                e_error(ctx->cctx->event, "%s", error);
                        else if (ret == 0)