Bug 379748

Summary: [PATCH] Missing pselect syscall (OS X 10.11)
Product: [Developer tools] valgrind Reporter: Louis Brunner <louis.brunner.fr>
Component: generalAssignee: Rhys Kidd <rhyskidd>
Status: RESOLVED FIXED    
Severity: normal CC: ivosh, louis.brunner.fr, rhyskidd, zerderr
Priority: NOR    
Version: 3.13 SVN   
Target Milestone: ---   
Platform: macOS (DMG)   
OS: macOS   
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 365327    
Attachments: Adds the pselect handler
Adds the pselect handler (Darwin specific)

Description Louis Brunner 2017-05-12 11:47:58 UTC
Created attachment 105473 [details]
Adds the pselect handler

Adds the pselect handler in the generic syscall file because it is defined by POSIX and the implementation is fairly basic (select with an extra check).
It is only included by Darwin (Linux seems to have its own handler).
Comment 1 Ivo Raisr 2017-05-13 05:38:37 UTC
POSIX does not mandate pselect kernel interface; it mandates only pselect system (library) interface. Therefore placing pselect syscall wrapper in syswrap-generic. is not very fortunate.
Have a look at other OSes and their kernel interfaces - Linux has pselect6, Solaris has no pselect at all (libc bases it directly on ppoll). Only *BSD seems to have the same kernel interface as OS X does.
Comment 2 Louis Brunner 2017-05-15 15:45:36 UTC
Created attachment 105563 [details]
Adds the pselect handler (Darwin specific)

Ivo,

My bad, thanks for the correction!
I moved it to Darwin instead of generic.
Comment 3 Rhys Kidd 2017-09-03 17:10:00 UTC
Based on xnu source this syscall #394 as pselect was added in OS X 10.11 (El Capitan).

Thanks for the patch Louis. A version based upon it was committed as 55fe390.