summaryrefslogtreecommitdiffstats
path: root/mbox.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-09-06 15:39:07 -0700
committerKevin McCarthy <kevin@8t8.us>2020-09-06 15:39:07 -0700
commit4219d5f930caf272c83b11a4eeab654a48a8b8f2 (patch)
tree9ab3e268727c867a3eeb93a4a6a93379d04d24fe /mbox.c
parent7157d009d31f1d2c8eaf47c67d818e1bbf3c2ca5 (diff)
Block signals during mbox-append operation.
I first noticed this back in 2017, but no one replied to my query to mutt-dev and I forgot about it too. Thanks to Oswald Buddenhagen for the followup when he was going through the mailing list archives, confirming the mistake. I've also reviewed MUTT_APPEND and MUTT_NEWFOLDER uses to make sure the context is properly closed (and the signals restored).
Diffstat (limited to 'mbox.c')
-rw-r--r--mbox.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mbox.c b/mbox.c
index 10361184..6b3c381a 100644
--- a/mbox.c
+++ b/mbox.c
@@ -479,9 +479,11 @@ static int mbox_open_mailbox_append (CONTEXT *ctx, int flags)
return -1;
}
+ mutt_block_signals ();
if (mbox_lock_mailbox (ctx, 1, 1) != 0)
{
mutt_error (_("Couldn't lock %s\n"), ctx->path);
+ mutt_unblock_signals ();
safe_fclose (&ctx->fp);
return -1;
}