Since #14336 we use poll()
on systems which support it properly and fall back to select()
otherwise.
@jamesob did some research on the implementation used on macOS and found it lacking. Although in principle our current use of it shouldn’t cause a problem.
I checked to see if perhaps Apple has improved things since 2018. They moved the repo, so the knote_fdfind
implementation is now here: https://github.com/apple-oss-distributions/xnu/blame/main/bsd/kern/kern_event.c#L6198
Other than using a reference on one line (struct filedesc *fdp = &p->p_fd;
) nothing has changed.
In other words, we should probably leave things as they are for now, unless there’s another pressing reason to prefer poll()
over select()
.