bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Code for testing hurdselect.c


From: Richard Braun
Subject: Re: Code for testing hurdselect.c
Date: Thu, 18 Oct 2012 11:12:22 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Oct 18, 2012 at 09:13:28AM +0200, Svante Signell wrote:
> On Tue, 2012-10-16 at 23:40 +0200, Samuel Thibault wrote:
> > Hello,
> > 
> > Svante Signell, le Fri 24 Aug 2012 04:52:15 +0200, a écrit :
> > > - file descriptors were read, sorted, and the good ones registered.

Why sorted ? How do you know the "good ones" from the others ?

> > I have to say I don't understand why doing it. If there is any file
> > descriptor which is not valid, the whole call has to return EBADF,
> > that's what POSIX asks.
> 
> According to POSIX that is correct for select(). However, I think you
> missed the line below in my message:
> Note: Only for the poll case, select was not yet implemented!

The poll() call was added after select() ...

> And there POSIX says:
> The poll() function shall support regular files, terminal and
> pseudo-terminal devices, FIFOs, pipes, sockets and [XSR] [Option Start]
> STREAMS-based files. [Option End] The behavior of poll() on elements of
> fds that refer to other types of file is unspecified.
> and
> RETURN VALUE
>         Upon successful completion, poll() shall return a non-negative
>         value. A positive value indicates the total number of file
>         descriptors that have been selected (that is, file descriptors
>         for which the revents member is non-zero).

I also still don't see the point.

-- 
Richard Braun



reply via email to

[Prev in Thread] Current Thread [Next in Thread]