the thread is set for asynchronous cancellation and cancellation
is enabled. This fixes a long standing occasional failure in
the pth_cancel2 test.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2878
VG_(threads)[cee].cancel_pend = cancelpend_hdlr;
- /* interrupt a pending syscall */
- VG_(proxy_abort_syscall)(cee);
+ /* interrupt a pending syscall if asynchronous cancellation
+ is enabled for the target thread */
+ if (VG_(threads)[cee].cancel_st && !VG_(threads)[cee].cancel_ty) {
+ VG_(proxy_abort_syscall)(cee);
+ }
if (VG_(clo_trace_sched)) {
VG_(sprintf)(msg_buf,