2002-08-07 03:55:50

by Steve

[permalink] [raw]
Subject: Using Poll

Hey,
I recentally enquried about the FD Limit Size.. and how to enlarge
it.. I was told to use the poll system instead.. How Do i use this Poll
System?

/Steve


2002-08-07 06:51:19

by Chris Wedgwood

[permalink] [raw]
Subject: Re: Using Poll

On Wed, Aug 07, 2002 at 01:59:22PM +1000, Steve wrote:

Hey,
I recentally enquried about the FD Limit Size.. and how to
enlarge it.. I was told to use the poll system instead.. How Do i
use this Poll System?

Can you explain a little more what you are trying to do here? poll(2)
is documented so I am not sure what you are asking...


--cw

2002-08-07 13:36:33

by Mark Mielke

[permalink] [raw]
Subject: Re: Using Poll

On Tue, Aug 06, 2002 at 11:54:58PM -0700, Chris Wedgwood wrote:
> On Wed, Aug 07, 2002 at 01:59:22PM +1000, Steve wrote:
> > Hey,
> > I recentally enquried about the FD Limit Size.. and how to
> > enlarge it.. I was told to use the poll system instead.. How Do i
> > use this Poll System?
> Can you explain a little more what you are trying to do here? poll(2)
> is documented so I am not sure what you are asking...

He is probably talking about configuring the system to support more than
1024 file descriptors per process.

On Linux (POSIX?), fd_set is only 1024 bits long, making select() unusable,
or at least, not portably usable.

Since poll() uses an int to represent the file descriptor, poll() works
in situations that select() does not, although I would suspect that poll()
with this many active file descriptors (assuming one was actually waiting
for an event on 1024+ file descriptors) will probably kill sink quite a few
system seconds into the process over time.

Steve: As Chris mentions, poll(2) is documented. "man poll" will tell you
everything you need to know.

mark

--
[email protected]/[email protected]/[email protected] __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada

One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...

http://mark.mielke.cc/