LinuxThreads cancellation bug.

Kaz Kylheku kaz@ashi.footprints.net
Mon Nov 6 09:42:00 GMT 2000


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.''




More information about the Libc-alpha mailing list