lkml.org 
[lkml]   [2023]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: Question about select and poll system call
Date
> 2. Can we unify the two different system calls? For example, using
> poll(...) to implement the frontend select call(...), is there
> something I'm missing for current implementation? The Cons and Pros,
> etc

The underlying code that implements them is common.

Beware that the glibc select() wrappers have their own limit
on the highest fd.
Exceeding that limit (probably 1024) will cause buffer overruns
in the application (One of the Android apps I uses crashes that way).

select() also doesn't scale well for sparse lists of fds.
So it really is best to use poll() and never select().
(Although for very large fd lists epoll() may be a better choice.)

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
\
 
 \ /
  Last update: 2023-03-27 01:00    [W:0.116 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site