View Issue Details

IDProjectCategoryView StatusLast Update
00008811003.1(2013)/Issue7+TC1System Interfacespublic2020-10-16 09:06
Reporterphilip-guenther Assigned Toajosey  
PrioritynormalSeverityCommentTypeEnhancement Request
Status ClosedResolutionDuplicate 
NamePhilip Guenther
OrganizationOpenBSD
User Reference
Sectionppoll()
Page Numbern/a
Line Numbern/a
Interp Status---
Final Accepted Text
Summary0000881: add ppoll()
DescriptionIn general, select() is a harder to use interface than poll(): the fdset sizing is non-trivial with an amazing number of off-by-one errors in the select() call, exceptfds is misused or misinterpreted by many programs, supporting large fd values is inefficient, etc.

The issue for POSIX is that pselect() was added without also adding ppoll().


#include <poll.h>
int ppoll(struct pollfd fds[], nfds_t nfds, const struct timespec *, const sigset_t *);

ppoll is to poll as pselect is to select.

Already implemented under that name in both Linux and OpenBSD and, I believe, illumos.

NetBSD has this functionality under the name pollts().
Desired ActionAdd ppoll()
TagsNo tags attached.

Relationships

duplicate of 0001263 Closed 1003.1(2016/18)/Issue7+TC2 Add ppoll( ) 

Activities

joerg

2014-10-09 09:49

reporter   bugnote:0002410

If a new interface should be added, we should rather add the interface from Solaris, currently:

_pollsys(struct pollfd *fds, nfds_t nfd, const timespec_t *timeout,
        const sigset_t *sigmask)

that exists since 2003.

geoffclare

2014-10-09 10:47

manager   bugnote:0002411

In Solaris 11, _pollsys() seems to be an internal libc interface that is not exposed for use by applications. It has no prototype in the headers, no man page, and attempting to use it produces an "undefined symbol" linker error.

By contrast, Solaris 11 does have a useable ppoll(), with a prototype in <poll.h> and a man page (shared with poll()).

joerg

2014-10-09 11:05

reporter   bugnote:0002412

Sorry, it seems that I did slip the sigmask parameter from the ppoll() proposal from above.

BTW: the ppoll() call in Solaris just forwards to _pollsys()

ajosey

2015-01-29 17:12

manager   bugnote:0002530

Martin has sent a call to sponsor the interface to The Open Group Base Working Group (as of Jan 22 2015)

geoffclare

2020-10-16 09:06

manager   bugnote:0005048

Although this bug was chronologically before bug 0001263, the latter has the detailed changes to add ppoll() and so this bug is being closed as a duplicate of it.

Issue History

Date Modified Username Field Change
2014-10-09 06:04 philip-guenther New Issue
2014-10-09 06:04 philip-guenther Status New => Under Review
2014-10-09 06:04 philip-guenther Assigned To => ajosey
2014-10-09 06:04 philip-guenther Name => Philip Guenther
2014-10-09 06:04 philip-guenther Organization => OpenBSD
2014-10-09 06:04 philip-guenther Section => ppoll()
2014-10-09 06:04 philip-guenther Page Number => n/a
2014-10-09 06:04 philip-guenther Line Number => n/a
2014-10-09 09:16 geoffclare Project 2008-TC1 => 1003.1(2013)/Issue7+TC1
2014-10-09 09:49 joerg Note Added: 0002410
2014-10-09 10:47 geoffclare Note Added: 0002411
2014-10-09 11:05 joerg Note Added: 0002412
2015-01-29 17:12 ajosey Note Added: 0002530
2019-08-03 15:22 eblake Relationship added duplicate of 0001263
2020-10-16 09:06 geoffclare Interp Status => ---
2020-10-16 09:06 geoffclare Note Added: 0005048
2020-10-16 09:06 geoffclare Status Under Review => Closed
2020-10-16 09:06 geoffclare Resolution Open => Duplicate