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: Samuel Thibault
Subject: Re: Code for testing hurdselect.c
Date: Thu, 18 Oct 2012 13:27:28 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, le Thu 18 Oct 2012 11:43:04 +0200, a écrit :
> Remember: This was written a long time ago, why making a big issue of
> it?

Because apparently your changes were made to fix an issue in ntpdate. So
we need to determine exactly what the fix should be.

> > 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.
> 
> POSIX does not specify to return EBAFD for the POLL case as for the
> SELECT case. That's it. 

That's what was completely missing in your description...

So EBADF would have to go through POLLERR? It's not clear in the norm: 

POLLERR
        An error has occurred on the device or stream.

EBADF means the device or stream doesn't even exist, since the
descriptor is invalid. So it seems like POSIX does not specify the
behavior, and thus the current Hurd behavior is correct, and it's
ntpdate which needs to be fixed into not passing an invalid descriptor.

Samuel



reply via email to

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