Revert "Don't init backend if Vim is about to fork"

This reverts commit ef03c36272e9a45f71659df7cecfce7aa15c2cbf.

Conflicts:

	src/MacVim/gui_macvim.m
This commit is contained in:
Bjorn Winckler
2009-02-10 22:06:18 +01:00
parent 95a678d204
commit 9393a4151c
-18
View File
@@ -25,7 +25,6 @@ static NSString *MMDefaultFontName = @"DejaVu Sans Mono";
static int MMDefaultFontSize = 12;
static int MMMinFontSize = 6;
static int MMMaxFontSize = 100;
static BOOL gui_mch_init_has_finished = NO;
static GuiFont gui_macvim_font_with_name(char_u *name);
@@ -99,15 +98,6 @@ gui_mch_init(void)
{
//NSLog(@"gui_mch_init()");
// NOTE! Because OS X has to exec after fork we effectively end up doing
// the initialization twice (because this function is called before the
// fork). To avoid all this extra work we check if Vim is about to fork,
// and if so do nothing for now.
//
// TODO: Is this check 100% foolproof?
if (gui.dofork && (vim_strchr(p_go, GO_FORG) == NULL))
return OK;
if (![[MMBackend sharedInstance] checkin]) {
// TODO: Kill the process if there is no terminal to fall back on,
// otherwise the process will run outputting to the console.
@@ -140,8 +130,6 @@ gui_mch_init(void)
// in [g]vimrc.
gui_mch_adjust_charheight();
gui_mch_init_has_finished = YES;
return OK;
}
@@ -162,12 +150,6 @@ gui_mch_exit(int rc)
int
gui_mch_open(void)
{
//NSLog(@"gui_mch_open()");
// This check is to avoid doing extra work when we're about to fork.
if (!gui_mch_init_has_finished)
return OK;
return [[MMBackend sharedInstance] openGUIWindow];
}