johnae / spook

Lightweight programmable evented utility based on LuaJIT and ljsyscall
Other
35 stars 0 forks source link

Assorted fixes #47

Closed johnae closed 6 years ago

johnae commented 6 years ago

This mainly fixes stdin events on BSD:s when an editor does an atomic save in a certain way (as intellij does):

write new content to a temp path move original file path to a temp path move the "new content" temp path to original path remove the old original now at some temp path

Since kqueue can't realistically detect these events the fix (for stdin mode) is to just make delete events valid events (eg. they trigger spook to do whatever it was told to do when something happens).

The watcher for BSD:s has been reworked to rely more on inodes (which is what's being watched really on BSD) rather than paths.

There's a fix to event ordering on Linux in here as well.