diff options
| author | Eli Zaretskii | 2013-11-28 21:40:15 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-11-28 21:40:15 +0200 |
| commit | 9c099ca7fd30b424b3e2f183652de888cd9b30b7 (patch) | |
| tree | 7823c33618b120f588addcfc4321eeeb4e4da901 /src/w32notify.c | |
| parent | 16555151e0051faad2838505e80fcbd1f744cb9e (diff) | |
| download | emacs-9c099ca7fd30b424b3e2f183652de888cd9b30b7.tar.gz emacs-9c099ca7fd30b424b3e2f183652de888cd9b30b7.zip | |
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/w32notify.c')
| -rw-r--r-- | src/w32notify.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/w32notify.c b/src/w32notify.c index 1f2ef83b2fd..373e20e8e92 100644 --- a/src/w32notify.c +++ b/src/w32notify.c | |||
| @@ -163,7 +163,12 @@ send_notifications (BYTE *info, DWORD info_size, void *desc, | |||
| 163 | && PostThreadMessage (dwMainThreadId, WM_EMACS_FILENOTIFY, 0, 0)) | 163 | && PostThreadMessage (dwMainThreadId, WM_EMACS_FILENOTIFY, 0, 0)) |
| 164 | || (FRAME_W32_P (f) | 164 | || (FRAME_W32_P (f) |
| 165 | && PostMessage (FRAME_W32_WINDOW (f), | 165 | && PostMessage (FRAME_W32_WINDOW (f), |
| 166 | WM_EMACS_FILENOTIFY, 0, 0))) | 166 | WM_EMACS_FILENOTIFY, 0, 0)) |
| 167 | /* When we are running in batch mode, there's no one to | ||
| 168 | send a message, so we just signal the data is | ||
| 169 | available and hope sys_select will be called soon and | ||
| 170 | will read the data. */ | ||
| 171 | || (FRAME_INITIAL_P (f) && noninteractive)) | ||
| 167 | notification_buffer_in_use = 1; | 172 | notification_buffer_in_use = 1; |
| 168 | done = 1; | 173 | done = 1; |
| 169 | } | 174 | } |