From 722a516400bd9a03211f28a90b2dd42b7dce5d0e Mon Sep 17 00:00:00 2001 From: davidxu Date: Fri, 24 Sep 2010 07:52:07 +0000 Subject: In most cases, cancel_point and cancel_async needn't be checked again, because cancellation is almostly checked at cancellation points. --- lib/libthr/thread/thr_fork.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/libthr/thread/thr_fork.c') diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index fb5daa1..a1399bf 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -248,7 +248,8 @@ _fork(void) _thr_rwlock_unlock(&_thr_atfork_lock); curthread->no_cancel = cancelsave; /* test async cancel */ - _thr_testcancel(curthread); + if (curthread->cancel_async) + _thr_testcancel(curthread); } errno = errsave; -- cgit v1.1