diff options
| author | Po Lu | 2025-02-26 09:56:46 +0800 |
|---|---|---|
| committer | Po Lu | 2025-02-26 10:39:46 +0800 |
| commit | 928dc34e05fc04a9b8394df477beca2ef6d9fd1b (patch) | |
| tree | 49155540107962e0bafe822ac01aa87b85dc6707 /src | |
| parent | 68f9a7aac1f5b9606ca6245e1dd74d09087752d4 (diff) | |
| download | emacs-928dc34e05fc04a9b8394df477beca2ef6d9fd1b.tar.gz emacs-928dc34e05fc04a9b8394df477beca2ef6d9fd1b.zip | |
Guarantee delivery of inotify special events
* src/inotify.c (inotifyevent_to_event): Always match events
that are not encompassed by IN_ALL_EVENTS and which the
documentation implies are always delivered to callbacks.
* test/src/inotify-tests.el (inotify-file-watch-stop-delivery):
New test.
Diffstat (limited to 'src')
| -rw-r--r-- | src/inotify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/inotify.c b/src/inotify.c index ff842ddc58c..c29d940c984 100644 --- a/src/inotify.c +++ b/src/inotify.c | |||
| @@ -187,7 +187,10 @@ inotifyevent_to_event (Lisp_Object watch, struct inotify_event const *ev) | |||
| 187 | uint32_t mask; | 187 | uint32_t mask; |
| 188 | CONS_TO_INTEGER (Fnth (make_fixnum (3), watch), uint32_t, mask); | 188 | CONS_TO_INTEGER (Fnth (make_fixnum (3), watch), uint32_t, mask); |
| 189 | 189 | ||
| 190 | if (! (mask & ev->mask)) | 190 | if (! (mask & ev->mask) |
| 191 | /* These event types are supposed to be reported whether or not | ||
| 192 | they appeared in the ASPECT list when monitoring commenced. */ | ||
| 193 | && !(ev->mask & (IN_IGNORED | IN_Q_OVERFLOW | IN_ISDIR | IN_UNMOUNT))) | ||
| 191 | return Qnil; | 194 | return Qnil; |
| 192 | 195 | ||
| 193 | if (ev->len > 0) | 196 | if (ev->len > 0) |