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

Display correct error on max-files-watch #285

Merged
merged 1 commit into from
Mar 19, 2021
Merged

Display correct error on max-files-watch #285

merged 1 commit into from
Mar 19, 2021

Conversation

0xpr03
Copy link
Member

@0xpr03 0xpr03 commented Mar 11, 2021

This is a draft to display the correct error message when maximum number of files watchable is reached. Under linux you can test this by using the default example and setting sudo sysctl -w fs.inotify.max_user_watches=1

It currently works as expected on

  • linux
  • Windows
  • MacOS

Windows does not seem to expose some kinds of limits on its API.

I don't have access to a mac system but they have limit, so it'd be nice to know how its working over there (possibly the same due to libc?). Windows will probably behave completely different. See down below for why macos doesn't seem to need any changes.

Fixes #266

@0xpr03
Copy link
Member Author

0xpr03 commented Mar 11, 2021

On a separate note: We might want to have a list of people than can test stuff like glutin/rust-windowing has.

See #266

Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
@0xpr03 0xpr03 marked this pull request as ready for review March 12, 2021 09:59
@0xpr03
Copy link
Member Author

0xpr03 commented Mar 17, 2021

This is blocked by a mac implementation (possibly just another cfg with its error no) which I can't do as I don't have any apple machine.

@0xpr03 0xpr03 requested a review from JohnTitor March 17, 2021 08:08
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me, though I also don't have a macOS machine :/ Could we check it with a (temporary) test on CI?

@0xpr03
Copy link
Member Author

0xpr03 commented Mar 19, 2021

With the help of a friend I've come to the following conclusion: There doesn't seem to be an watch-files limit on mac. And if there would be, you would not get any userland reports.. Also the only real limits seems to be how many watchers you can spawn in parallel until you reach a thread limit, that is reported as "Resource temporarily unavailable" which I think is good enough.

Thus I'd only add the linux change and leave everything else as is.

@0xpr03 0xpr03 merged commit ef81a63 into main Mar 19, 2021
0xpr03 added a commit that referenced this pull request Mar 19, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
@0xpr03 0xpr03 deleted the fix_266 branch March 19, 2021 18:18
0xpr03 added a commit that referenced this pull request Mar 19, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
0xpr03 added a commit that referenced this pull request Mar 19, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
0xpr03 added a commit that referenced this pull request Mar 19, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
0xpr03 added a commit that referenced this pull request Mar 21, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
0xpr03 added a commit that referenced this pull request Mar 22, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
0xpr03 added a commit that referenced this pull request Mar 22, 2021
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
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

Successfully merging this pull request may close these issues.

'Error: No space left on device (os error 28)' when watching too many files
2 participants