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

More precise inotify related function signatures #2599

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

thg2k
Copy link
Contributor

@thg2k thg2k commented Sep 3, 2023

Changes

  1. inotify_add_watch: Narrowed the returned value: It can only be a non-negative integer according to the man page
  2. inotify_add_watch: Added false in case of failure, same concept as fopen(), in case the file does not exist or is not readable
  3. inotify_queue_len: Narrowed the return value: It can only be zero or positive
  4. inotify_read: Narrowed the return value: Added the shape of the returned array
  5. inotify_read: Added false in case the stream is set a non-blocking.

Question: I have a doubt about point 5, i.e. adding false as possible return type to inotify_read. This can only happen if the inotify stream is set as non-blocking (tested). Should this go to the bleeding version of the signatures map?

@ondrejmirtes
Copy link
Member

Let's try this like that :) Thank you!

@ondrejmirtes ondrejmirtes merged commit e7d4c92 into phpstan:1.10.x Sep 4, 2023
411 of 414 checks passed
@thg2k thg2k deleted the pr/1.10.x-inotify branch September 4, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants