This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about which sleep is noted in manual

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.

> 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
> this.
> 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
Ma Shimiao
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]