Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Oct 95 09:34 PDT
From:      jdp@polstra.com (John Polstra)
To:        freebsd-hackers@polstra.com
Subject:   Re: getdtablesize() broken?
Message-ID:  <m0t5EyY-000077C@seattle.polstra.com>

next in thread | raw e-mail | index | archive | help
In <199510170210.TAA26181@phaeton.artisoft.com>, Terry Lambert
<terry@lambert.org> wrote:
> > >Poll, anyone?
> > 
> > >Poll is inferior to select, 
> > 
> > Debatable.
> 
> Not.  8-).
> 
> > >both because of the 10ms limit on timeout
> > >resoloution 
> > 
> > Man pages only say that if the host does not support millisecond
> > accuracy then the value is rounded up to the nearest legal value
> > available.
> 
> 10ms is the argument resoloution.  On Solaris, it's 10ms, while select()
> is till 4uS.  select() wins.  8-).

Why do you say "10ms is the argument resoloution"?  The man pages
explicitly say that the timeout is specified in milliseconds.  Simple
tests indicate that the man pages are accurate.  What is the basis for
your claim?

> > [Responding to a claim by Terry that poll doesn't support simple timed
> > waits not involving file descriptors]
> >
> > That hasn't been my experience. poll(0, NULL, 10000); waits 10 seconds
> > on SunOS, all SVR4-en I have here, HPUX, and AIX; however Digital Unix's
> > poll looses. In fact in SVR4 select(3) is implemented using poll(2).
> 
> That's a bug in SVR4.  SVR4 is broken and bogus in many, many ways.

You're confusing me.  First you say that poll is no good because it
doesn't support simple timed waits.  Then somebody points out that you
were wrong, and poll does in fact support that.  So then you say that
polls which work that way are broken.

Poll is broken, because it fails to exhibit the broken behavior which you
originally claimed it had?  Have I got this right?

> SVR4 is broken and bogus in many, many ways.

Of course SVR4 is broken.  FreeBSD is broken.  Linux is broken.  VMS is
broken.  They're all broken, in one way or another.  That doesn't
automatically mean that their every feature is broken.

I've used both select and poll in many, many applications.  They both got
the job done for me.

   John Polstra                                       jdp@polstra.com
   Polstra & Co., Inc.                        Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0t5EyY-000077C>