Skip to content
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

Windows: Programs writing to files with ShareMode=0 can't modify the file #17

Closed
thesolution opened this issue Apr 4, 2013 · 2 comments

Comments

@thesolution
Copy link

The Tail functionality of the filewatch gem leaves the file being tailed open. This is a problem when a windows program opens a file with dwShareMode=0.
MSDN

I have submitted a pull request that adds a feature to close the file being tail-ed after every read.

The feature is turned on with the env var CloseAfterRead set to "true".

This issue was found when we tried to use LogStash to watch logs on one of our Windows servers.

I have a small VS2012 C++ project that opens the file with an exclusive lock. I can create a repo and link to if it that is helpful.

@jhmartin
Copy link

Any progress on this? I am having a simliar issue where my java apps can't rotate their logfiles since logstash is reading them.

@jsvd
Copy link
Collaborator

jsvd commented Feb 20, 2015

this has been fixed on JRuby, the issue still exists on MRI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants