summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-11-28 21:40:15 +0200
committerEli Zaretskii <eliz@gnu.org>2013-11-28 21:40:15 +0200
commit9c099ca7fd30b424b3e2f183652de888cd9b30b7 (patch)
tree7823c33618b120f588addcfc4321eeeb4e4da901 /src/emacs.c
parent16555151e0051faad2838505e80fcbd1f744cb9e (diff)
downloademacs-9c099ca7fd30b424b3e2f183652de888cd9b30b7.tar.gz
Fix bug #15933 with crashes in file-notify-tests on MS-Windows.
Support w32 file notifications in batch mode. src/w32proc.c (sys_select): Don't wait on interrupt_handle if it is invalid (which happens in batch mode). If non-interactive, call handle_file_notifications to store file notification events in the input queue. src/w32notify.c (send_notifications): Handle FRAME_INITIAL frames as well. src/w32inevt.c (handle_file_notifications): Now external, not static. src/w32term.h (handle_file_notifications): Provide prototype. src/emacs.c (main) [HAVE_W32NOTIFY]: When non-interactive, call init_crit, since init_display, which does that otherwise, is not called.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 75082ecef7d..159b0d5040d 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1517,6 +1517,10 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
init_keyboard (); /* This too must precede init_sys_modes. */
if (!noninteractive)
init_display (); /* Determine terminal type. Calls init_sys_modes. */
+#if HAVE_W32NOTIFY
+ else
+ init_crit (); /* w32notify.c needs this in batch mode. */
+#endif /* HAVE_W32NOTIFY */
init_xdisp ();
#ifdef HAVE_WINDOW_SYSTEM
init_fringe ();