From 41c72956179a8ed730d1ac8198015934398fe72b Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 24 May 2021 18:56:59 -0300 Subject: 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. --- nptl/pthread_create.c | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'nptl/pthread_create.c') 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 -- cgit 1.4.1