-
Notifications
You must be signed in to change notification settings - Fork 382
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
v1p: Fix invalid poll() usage with a new VTIM_poll() #4050
Conversation
Also, POSIX documents -1 and only that to disable the timeout in |
Could we maybe put it in But, an argument can be made for neither to be in the "correct" place. |
I totally agree, I wasn't sure where it belonged, but VTCP could be a better home for this one. |
I was planning to review out poll usage once that is merged. |
Tested, works on FreeBSD, but: It feels somewhat unsanitary to put a wrapper for poll(2) in VTIM. A |
I actually moved it to |
IMO I still think we should start with a |
Ack, I will amend the branch and merge it once ready. FWIW I find it a bad fit for all the places I considered: VTIM, VTCP, VUS, VFIL, VEV and Waiter. |
I agree with not going VTCP, but why not just go for EDIT: or if having timeout in the name is desirable then go with:
|
Obviously I'm biased, this is what I picked initially... But I guess we could also have a |
bugwash: make it a vtim_dur-to-poll-argument conversion function and use sth like |
It takes a vtim_dur and returns a number of milliseconds. NAN means no timeout and negative values are considered expired deadlines and get a chance to succeed a non-blocking poll.
Otherwise poll(2) returns EINVAL on FreeBSD when both pipe_timeout and pipe_task_deadline are disabled. Fixes varnishcache#4043
The expectations on FreeBSD are stricter than on Linux.