 +		gui.vimWindow->Unlock();
 +}
 +
-+#define RUN_BAPPLICATION_IN_NEW_THREAD	1
++#define RUN_BAPPLICATION_IN_NEW_THREAD	0
 +
 +#if RUN_BAPPLICATION_IN_NEW_THREAD
 +

 }
 
-#if !defined(UNIX) || !defined(SIGTSTP) || defined(PROTO) || defined(__BEOS__)
+#if !defined(UNIX) || !defined(SIGTSTP) || defined(PROTO) || defined(__BEOS__) || defined(__HAIKU__) 
 /*
  * When the OS can't really suspend, call this function to start a shell.
  * This is never called in the GUI.
@@ -1739,7 +1739,7 @@
      * If we can't get any, and there isn't any in the buffer, we give up and
      * exit Vim.
      */
-# ifdef __BEOS__
+# if defined(__BEOS__) || defined(__HAIKU__)
     /*
      * On the BeBox version (for now), all input is secretly performed within
      * beos_select() which is called from RealWaitForChar().
diff -Naur vim72/src/version.c vim72.haiku/src/version.c
--- vim72/src/version.c	2009-04-19 20:53:35.000000000 +0000
+++ vim72.haiku/src/version.c	2009-04-23 22:39:10.000000000 +0000

 # define MAY_FORK
     int		dofork = TRUE;
 #endif
@@ -1297,7 +1297,11 @@
 again:
     busy = TRUE;
