Skip to contentSkip to conversation

ppoll with multiple threads

DISCUSSION Ian Pilcher 2 participants 2 messages Sep 26, 2013 – May 2, 2015 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

The select(2) man page was updated about a year ago to clarify the behavior of pselect in multi-threaded programs.

http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/man2/select.2?id=2e72e991695f745d6419feeb77598f61d8c86a52

Should a similar update be made to poll(2) for ppoll?

If I'm reading the kernel source (fs/select.c) correctly, both syscalls (pselect6 and ppoll) use a (possibly unfortunately named) "sigprocmask" function to manipulate the signal mask, so their behavior should be the same in this regard.

Also, it might be nice to clarify that these changes are clarifications of existing behavior, rather than new behavior (i.e. clarify the clarification). The current situation is pretty confusing:

http://stackoverflow.com/questions/17011460/ppoll-vs-pselect-with-multiple-threads

Signature · 8 lines
========================================================================
Ian Pilcher                                         [email protected]
Sometimes there's nothing left to do but crash and burn...or die trying.
========================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive

Hello Ian,

Quoted 6 lines · Ian Pilcher

The select(2) man page was updated about a year ago to clarify the behavior of pselect in multi-threaded programs.

http://git.kernel.org/cgit/docs/man-pages/man-pages.git/commit/man2/select.2?id=2e72e991695f745d6419feeb77598f61d8c86a52

Should a similar update be made to poll(2) for ppoll?

Yes. Done. And I made the same change in the description of epoll_pwait().

Thanks,

Michael

Quoted 11 lines

If I'm reading the kernel source (fs/select.c) correctly, both syscalls (pselect6 and ppoll) use a (possibly unfortunately named) "sigprocmask" function to manipulate the signal mask, so their behavior should be the same in this regard.

Also, it might be nice to clarify that these changes are clarifications of existing behavior, rather than new behavior (i.e. clarify the clarification). The current situation is pretty confusing:

http://stackoverflow.com/questions/17011460/ppoll-vs-pselect-with-multiple-threads

Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html