-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.watch has double change events for file writes #3042
Comments
I cannot reproduce on OSX |
Also cannot reproduce on two Linux boxes. |
I was able to reproduce this consistently on Windows 7. |
Looks like the root of the problem is in libuv. Most likely this line is getting called twice. |
Might be an artifact of the file system or the kernel. I can't reproduce on 4.0.4-301.fc22.x86_64 with ext4. Can you run |
|
@andy-hanson Thanks. The salient bits:
The kernel is returning two 32 byte inotify events. The second one got cut off here but I'm willing to bet that if you pass |
@bnoordhuis Your were right. I've ran with |
Thanks. I don't think there is much we can do here, it's the kernel that delivers two distinct IN_MODIFY events. Libuv could coalesce them but then it has to pick a completely arbitrary time window to coalesce them in. It won't prevent duplicate events, just make them less prevalent. I suggest we leave well enough alone. |
Assuming this one is safe to close. |
Run these commands:
To get this output:
I'm running node v4.1.1 on Linux Mint 17.
The text was updated successfully, but these errors were encountered: