summary refs log tree commit diff
path: root/NEWS
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-17 09:45:03 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2021-06-23 13:45:13 -0300
commitbf6749a7f87c54e62db26b24c63b27004a110847 (patch)
tree9f847757df91f3ab89914c10dd00f9cc8e9c9154 /NEWS
parent03caacbc7f3004ad21fc00bf883f00421a211130 (diff)
downloadglibc-bf6749a7f87c54e62db26b24c63b27004a110847.tar.gz
glibc-bf6749a7f87c54e62db26b24c63b27004a110847.tar.xz
glibc-bf6749a7f87c54e62db26b24c63b27004a110847.zip
nptl: Use SA_RESTART for SIGCANCEL handler
The usage of signals to implementation pthread cancellation is an
implementation detail and should not be visible through cancellation
entrypoints.

However now that pthread_cancel always send the SIGCANCEL, some
entrypoint might be interruptable and return EINTR to the caller
(for instance on sem_wait).

Using SA_RESTART hides this, since the cancellation handler should
either act uppon cancellation (if asynchronous cancellation is enable)
or ignore the cancellation internal signal.

Checked on x86_64-linux-gnu and i686-linux-gnu.
Diffstat (limited to 'NEWS')
-rw-r--r--NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index d64be288da..48d77d706f 100644
--- a/NEWS
+++ b/NEWS
@@ -64,6 +64,14 @@ Deprecated and removed features, and other changes affecting compatibility:
 * The function pthread_yield has been deprecated; programs should use
   the equivalent standard function sched_yield instead.
 
+* The pthread cancellation handler is now installed with SA_RESTART and
+  pthread_cancel will always send the internal SIGCANCEL on a cancellation
+  request.  It should not be visible to application since the cancellation
+  handler should either act upon cancellation (if asynchronous cancellation
+  is enabled) or ignore the cancellation internal signal.  However there are
+  buggy kernel interfaces (for instance some CIFS version) that could still
+  see spurious EINTR error when cancellation interrupts a blocking syscall.
+
 Changes to build and runtime requirements:
 
 * On Linux, the shm_open, sem_open, and related functions now expect the