patch 8.2.0694: Haiku: channel and terminal do not work

Problem:    Haiku: channel and terminal do not work.
Solution:   Close files when the job has finished. (Ozaki Kiichi,
            closes #6039)
diff --git a/src/getchar.c b/src/getchar.c
index 9d8c0d4..8b417ec 100644
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -2147,7 +2147,7 @@
     for (i = 0; i < MAX_REPEAT_PARSE; ++i)
     {
 	// For Win32 mch_breakcheck() does not check for input, do it here.
-# if defined(MSWIN) && defined(FEAT_JOB_CHANNEL)
+# if (defined(MSWIN) || defined(__HAIKU__)) && defined(FEAT_JOB_CHANNEL)
 	channel_handle_events(FALSE);
 # endif