From 9393a4151cab7de1ffc54c71983ecf9184c23015 Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Tue, 10 Feb 2009 22:06:18 +0100 Subject: [PATCH] Revert "Don't init backend if Vim is about to fork" This reverts commit ef03c36272e9a45f71659df7cecfce7aa15c2cbf. Conflicts: src/MacVim/gui_macvim.m --- src/MacVim/gui_macvim.m | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/MacVim/gui_macvim.m b/src/MacVim/gui_macvim.m index 062db5e3e0..9bc12f7738 100644 --- a/src/MacVim/gui_macvim.m +++ b/src/MacVim/gui_macvim.m @@ -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]; }