Created
May 2, 2012 13:15
-
-
Save mattn/2576464 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 273fbf501965 src/gui.c | |
--- a/src/gui.c Mon Apr 30 21:09:43 2012 +0200 | |
+++ b/src/gui.c Tue May 01 19:32:14 2012 +0900 | |
@@ -270,6 +270,12 @@ | |
} | |
/* Child */ | |
+#ifdef FEAT_GUI_GTK | |
+ /* Call gtk_init_check() here. See gui_init_check(). */ | |
+ if (gui_mch_init_check() != OK) | |
+ exit(1); | |
+#endif | |
+ | |
# if defined(HAVE_SETSID) || defined(HAVE_SETPGID) | |
/* | |
* Change our process group. On some systems/shells a CTRL-C in the | |
@@ -430,7 +436,16 @@ | |
#ifdef ALWAYS_USE_GUI | |
result = OK; | |
#else | |
+# ifdef FEAT_GUI_GTK | |
+ /* | |
+ * Note: Don't call gtk_init(), gtk_init_check() before fork. | |
+ * This will be called after the fork. When calling that before fork, | |
+ * it make vim hang for a while. See gui_do_fork(). | |
+ */ | |
+ result = gui.dofork ? OK : gui_mch_init_check(); | |
+# else | |
result = gui_mch_init_check(); | |
+# endif | |
#endif | |
return result; | |
} |
What do you mean?
I mean we should use "#ifdef FEAT_GUI_GTK", but not use "#ifndef" in child process.
I tested your patch in Ubuntu 12.04, if change "#ifndef" -> "#ifdef", then everything is Ok.
Ah, I noticed it just now. hehehe.
Thanks for your notice.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
should be: