Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-19 Thread Nic Dade
> v3 Sure. Next time. > if ... expansion space Well uclibc does not do that. It defines sigset_t to match the kernel, and even has a comment about that. /* A 'sigset_t' has a bit for each signal. * glibc has space for 1024 signals (!), but most arches supported * by Linux have 64 signals,

Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-19 Thread Waldemar Brodkorb
Hi Nicolas, Nicolas S. Dade wrote, > This supercedes the previous pselect patch from 16 Dec 2015. Can you resend next time with PATCH v3 in the subject and a short Changelog after the comment ---. Thanks. What you think about Rich comment? best regards Waldemar

Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-18 Thread Rich Felker
On Thu, Dec 17, 2015 at 09:05:48PM +0100, Waldemar Brodkorb wrote: > Hi Nicolas, > Nicolas S. Dade wrote, > > > Linux has a pselect syscall since 2.6.something. Using it > > rather than emulating it with sigprocmask+select+sigprocmask > > is smaller code, and works properly. (The emulation has >

Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-18 Thread Rich Felker
On Fri, Dec 18, 2015 at 07:39:19PM -0800, Nicolas S. Dade wrote: > This supercedes the previous pselect patch from 16 Dec 2015. > > Linux has a pselect syscall since 2.6.something. Using it > rather than emulating it with sigprocmask+select+sigprocmask > is smaller code, and works properly. (The

Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-18 Thread Nic Dade
Off list a kind person pointed out that the pselect syscall really takes 7 arguments, and that my patch worked (or rather, didn't fail) for me by dumb luck. Please disregard the original patch. I'll resend a new patch shortly. -Nicolas S. Dade ___

Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-18 Thread Nic Dade
> real code / testcase Should be easy yup. With an unpatched uclibc this code hangs in pselect() because the pending signal fires during the window between the sigprocmkas() and the select(). A proper pselect() returns with errno EINTR.

Re: [PATCH] pselect: Use linux pselect syscall when available

2015-12-17 Thread Waldemar Brodkorb
Hi Nicolas, Nicolas S. Dade wrote, > Linux has a pselect syscall since 2.6.something. Using it > rather than emulating it with sigprocmask+select+sigprocmask > is smaller code, and works properly. (The emulation has > race conditions when unblocked signals arrive before or > after the select)