This is the mail archive of the
mailing list for the glibc project.
Re: question about which sleep is noted in manual
- From: MaShimiao <mashimiao dot fnst at cn dot fujitsu dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>, <codonell at redhat dot com>
- Date: Tue, 23 Dec 2014 12:31:28 +0800
- Subject: Re: question about which sleep is noted in manual
- Authentication-results: sourceware.org; auth=none
- References: <547ED48B dot 2060509 at cn dot fujitsu dot com> <oregs9zvl2 dot fsf at free dot home> <5487EAF0 dot 70305 at cn dot fujitsu dot com> <orfvcd7a7a dot fsf at free dot home> <5498E076 dot 4070802 at cn dot fujitsu dot com>
On 12/23/2014 11:24 AM, MaShimiao wrote:
> On 12/18/2014 02:18 PM, Alexandre Oliva wrote:
>> AC-Safe), the first patch below enables the cleanup handlers required to
>> that end. This might not sound like such a big deal, but the third
>> patch below elaborates on the reasons why it could be.
>> Before discussion the second patch, is the first patch ok to install?
> I tested with this path and it did work.
> So, this patch looks good to me.
Sorry, I forgot to note when testing I added bits/libc-lock.h to sleep.c.
If not, there will be a warning.
>> implies AC-Unsafe, and I didn't think it would be worth introducing
>> @mtasusig just for this one case, though I might if we choose to go with
>> Ok to install on top of the first patch?
> I have a comment on the second patch.
>> - __libc_cleanup_pop (0);
>> + /* Linux will wake up the system call, nanosleep, when SIGCHLD
>> + arrives even if SIGCHLD is ignored. We have to deal with it in
>> + libc, so we block SIGCHLD while sleeping if SIGCHLD shouldn't
>> + wake us up. */
>> + if (__sigprocmask (SIG_BLOCK, &set, &set))
>> + return -1;
>> - saved_errno = errno;
>> - /* Restore the original signal mask. */
>> - (void) __sigprocmask (SIG_SETMASK, &oset, (sigset_t *) NULL);
>> - __set_errno (saved_errno);
>> + if (!__sigismember (arg, SIGCHLD))
> arg is not a defined variable.
> Best regards
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)