howeyc / cl-fsnotify

File system notifications
http://howeyc.github.com/cl-fsnotify
ISC License
16 stars 6 forks source link

Error on open file event #7

Open ghost opened 9 years ago

ghost commented 9 years ago

Hello,

I tested cl-fsnotify on Mac OSX using ccl (Clozure Common Lisp). It detected correctly the creation and deletion of files. However, when I opened a file for modification (typically: vi ), then the program broke with the following error message:

Error: The value -1 is not of the expected type (UNSIGNED-BYTE 64). While executing: CL-FSNOTIFY-KQUEUE:ADD-WATCH, in process listener(1).

The code is just test code: (defun run-example () (open-fsnotify) (add-watch "/tmp/owned/") (loop for events = (get-events) while t when events do (format t "~{~A~%~}" events)))

Environment: Clozure Common Lisp Version 1.9-r15759 (DarwinX8664) Mac OS X 10.10.3 Yosemite Running from terminal session (/usr/local/bin/ccl/dx86cl64).

Any idea of the root cause?

Sincerely Your, Aurelien

ghost commented 9 years ago

Complementary information: The above bug happens only on CCL, I tried with SBCL and could not reproduce the problem. Instead, I see correctly events notifying the creation of temporary files and the modification of the file.

howeyc commented 9 years ago

I'm sorry but I can't help you. I don't own a Mac, I only know it works there because someone told me it did.

ghost commented 9 years ago

Let's say its an issue with CCL - I switched to SBCL anyway... Thank you for answering

muyinliu commented 8 years ago

Hi, I try the test code(and also use vi to modified files) in both CCL v1.10-r16196 (DarwinX8632) and CCL v1.10-r16196 (DarwinX8664) on Mac OS 10.10.5, everything works fine.

Now I'm try to download CCL v1.9 for more test.

muyinliu commented 8 years ago

I test code(and also use vi to modified files) in both CCL v1.9-r15759 (DarwinX8664) and CCL v1.9-r15758 (DarwinX8632) on Mac OS 10.10.5, get the same ERROR message. I think there is something wrong with CCL v1.9, not with cl-fsnotify. I suggest @aslodzian to switch to CCL v1.10 or CCL v1.11(also tested by me just now).