This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
LinuxThreads cancellation bug.
- To: Ulrich Drepper <drepper at cygnus dot com>
- Subject: LinuxThreads cancellation bug.
- From: Kaz Kylheku <kaz at ashi dot footprints dot net>
- Date: Mon, 6 Nov 2000 09:42:01 -0800 (PST)
- cc: libc-alpha at sources dot redhat dot com
If cancelation is disabled the pthread_cancel function bails without recording
that a cancelation request was made. This is incorrect behavior, because the
application cannot temporarily disable cancelation around code without
potentially losing a cancelation request.
I believe that the fix is simply to remove the test.
Also, the man pages and info documentation use misleading language: both talk
about cancelation requests being ``ignored'' when cancellation is disabled.
In signal handling, ignored means ``dropped on the floor'' (as opposed
to ``made pending''), so by association, that is how the term may be
interpreted in the descriptions of cancelation. POSIX doesn't use the term
``ignore''; there is no language to suggest that a request may be dropped:
``The pthread_cancel() function requests that thread be
canceled. The target thread's cancelability state and type
determines when the cancelation takes effect.''