about summary refs log tree commit diff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-05-24 18:56:59 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-09 15:16:45 -0300
commit41c72956179a8ed730d1ac8198015934398fe72b (patch)
tree16d4a48d236019c432431ba93de0c33856b5b80e /nptl/pthread_create.c
parent02189e8fb00c3c7f4e67476e21011a22c5dee707 (diff)
downloadglibc-41c72956179a8ed730d1ac8198015934398fe72b.tar.gz
glibc-41c72956179a8ed730d1ac8198015934398fe72b.tar.xz
glibc-41c72956179a8ed730d1ac8198015934398fe72b.zip
nptl: Install cancellation handler on pthread_cancel
Now that cancellation is not used anymore to handle thread setup
creation failure, the sighandle can be installed only when
pthread_cancel is actually used.

Checked on x86_64-linux-gnu and aarch64-linux-gnu.
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 02892b13bb..72ecda8b63 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -67,21 +67,6 @@ late_init (void)
   struct sigaction sa;
   __sigemptyset (&sa.sa_mask);
 
-  /* Install the cancellation signal handler (in static builds only if
-     pthread_cancel has been linked in).  If for some reason we cannot
-     install the handler we do not abort.  Maybe we should, but it is
-     only asynchronous cancellation which is affected.  */
-#ifndef SHARED
-  extern __typeof (__nptl_sigcancel_handler) __nptl_sigcancel_handler
-    __attribute__ ((weak));
-  if (__nptl_sigcancel_handler != NULL)
-#endif
-    {
-      sa.sa_sigaction = __nptl_sigcancel_handler;
-      sa.sa_flags = SA_SIGINFO;
-      (void) __libc_sigaction (SIGCANCEL, &sa, NULL);
-    }
-
   /* Install the handle to change the threads' uid/gid.  Use
      SA_ONSTACK because the signal may be sent to threads that are
      running with custom stacks.  (This is less likely for