patch 8.0.1795: lose contact with jobs when :gui forks
Problem: Lose contact with jobs when :gui forks.
Solution: Don't fork when there is a running job. Make log message for a
died job clearer. Also close the terminal when stderr and stdout
are the same FD.
diff --git a/src/gui.h b/src/gui.h
index b63125b..13c97e6 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -564,3 +564,7 @@
# define FUNC2GENERIC(func) G_CALLBACK(func)
# endif
#endif /* FEAT_GUI_GTK */
+
+#if defined(UNIX) && !defined(FEAT_GUI_MAC)
+# define GUI_MAY_FORK
+#endif