This is the mail archive of the libc-alpha@sourceware.org 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: [PATCH v2]: Avoid cancellable I/O primitives in ld.so.


On Apr 14 2018, Zack Weinberg <zackw@panix.com> wrote:

> diff --git a/csu/check_fds.c b/csu/check_fds.c
> index 2b181d44ab..605ee4f3f4 100644
> --- a/csu/check_fds.c
> +++ b/csu/check_fds.c
> @@ -39,8 +39,7 @@
>  static void
>  check_one_fd (int fd, int mode)
>  {
> -  /* Note that fcntl() with this parameter is not a cancellation point.  */
> -  if (__builtin_expect (__libc_fcntl (fd, F_GETFD), 0) == -1
> +  if (__builtin_expect (__fcntl_nocancel (fd, F_GETFD), 0) == -1

Please also change that to use __glibc_unlikely.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


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