[PATCH] Remove signal handling for nanosleep (bug 16364)

Florian Weimer fweimer@redhat.com
Mon Nov 9 12:45:00 GMT 2015


On 11/09/2015 01:18 PM, Adhemerval Zanella wrote:
> 
> 
> On 09-11-2015 05:53, Florian Weimer wrote:
>> On 11/08/2015 11:52 PM, Adhemerval Zanella wrote:
>>> Linux 2.6.32 and forward do not show the issue regarding SysV SIGCHLD
>>> vs. SIG_IGN for nanosleep which make it feasible to use it for sleep
>>> implementation without requiring any hacking to handle the spurious
>>> wake up.  This patch simplifies the sleep code to call nanosleep
>>> directly.
>>>
>>> Checked on x86_64, ppc64le, and aarch64.
>>
>> Do you know the kernel commit which fixed this?
> 
> I tried to track down the specific commit that fixed it, but I was unable
> to pin it down.  uClibc developers also seemed to do same [1], but also
> they could not find out the exact commit (which I think might be the reason
> they are using glibc strategy still). musl uses plain nanosleep as the
> patch.
> 
> [1] http://git.uclibc.org/uClibc/tree/libc/unistd/sleep.c

Could you write a glibc test case for this?  I don't feel comfortable
with removing the workaround without a test, and I can't find an
existing one.

Thanks,
Florian



More information about the Libc-alpha mailing list