Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000683 [1003.1(2013)/Issue7+TC1] System Interfaces Editorial Clarification Requested 2013-04-24 22:16 2019-06-10 08:55
Reporter philip-guenther View Status public  
Assigned To
Priority normal Resolution Accepted  
Status Closed  
Name Philip Guenther
Organization OpenBSD
User Reference
Section poll()
Page Number 1417
Line Number 46793-46795
Interp Status ---
Final Accepted Text
Summary 0000683: return value of poll() unclear when multiple pollfds have the same fd
Description What should poll() return if multiple pollfd structures passed to it have the same 'fd' value and more than one of those has a non-zero revents on return?

First off, it should be noted that nothing in the description bans such a call, so I don't think an error return is permitted for that cause.

The RETURN VALUE section of the poll() page states:
    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).

Saying that it's a count of the "file descriptors" would seem to mean that no matter how many pollfds reference the given fd, the return value must only be incremented by one. However, the systems I've tested (Solaris 10, FreeBSD 8, Linux 2.6.18, OpenBSD 5.2) all return the total number of pollfd structures that have revents non-zero.
Desired Action Change this:
    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).

to something like this:
    Upon successful completion, poll() shall return a non-negative value.
    A positive value indicates the total number of pollfd structures that
    have selected events (that is, those for which the revents member is
    non-zero).

Tags tc2-2008
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-04-24 22:16 philip-guenther New Issue
2013-04-24 22:16 philip-guenther Name => Philip Guenther
2013-04-24 22:16 philip-guenther Organization => OpenBSD
2013-04-24 22:16 philip-guenther Section => poll()
2013-04-24 22:16 philip-guenther Page Number => 1417
2013-04-24 22:16 philip-guenther Line Number => 46793-46795
2013-04-25 16:11 Don Cragun Interp Status => ---
2013-04-25 16:11 Don Cragun Status New => Resolved
2013-04-25 16:11 Don Cragun Resolution Open => Accepted
2013-04-25 16:11 Don Cragun Tag Attached: tc2-2008
2019-06-10 08:55 agadmin Status Resolved => Closed


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker