summaryrefslogtreecommitdiff
path: root/src/misc1.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-09-05 21:41:39 +0200
committerBram Moolenaar <Bram@vim.org>2013-09-05 21:41:39 +0200
commitbec9c20884290cc64e63d4eec531c0a2fbdcd3f6 (patch)
tree6a671564863f197e0d8bf4a471a6a72e149816b3 /src/misc1.c
parent9be44818921a9255b3a26bf5566f1939bf38804e (diff)
downloadvim-git-7.4.022.tar.gz
updated for version 7.4.022v7.4.022
Problem: Deadlock while exiting, because of allocating memory. Solution: Do not use gettext() in deathtrap(). (James McCoy)
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc1.c b/src/misc1.c
index fd5d1fda8..0a2d83be0 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -9174,6 +9174,8 @@ prepare_to_exit()
/*
* Preserve files and exit.
* When called IObuff must contain a message.
+ * NOTE: This may be called from deathtrap() in a signal handler, avoid unsafe
+ * functions, such as allocating memory.
*/
void
preserve_exit()
@@ -9196,7 +9198,7 @@ preserve_exit()
{
if (buf->b_ml.ml_mfp != NULL && buf->b_ml.ml_mfp->mf_fname != NULL)
{
- OUT_STR(_("Vim: preserving files...\n"));
+ OUT_STR("Vim: preserving files...\n");
screen_start(); /* don't know where cursor is now */
out_flush();
ml_sync_all(FALSE, FALSE); /* preserve all swap files */
@@ -9206,7 +9208,7 @@ preserve_exit()
ml_close_all(FALSE); /* close all memfiles, without deleting */
- OUT_STR(_("Vim: Finished.\n"));
+ OUT_STR("Vim: Finished.\n");
getout(1);
}