From owner-freebsd-threads@FreeBSD.ORG Sat Jan 29 14:31:54 2005 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FCBD16A4CE for ; Sat, 29 Jan 2005 14:31:54 +0000 (GMT) Received: from bute.st-andrews.ac.uk (bute.st-and.ac.uk [138.251.12.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48D3343D48 for ; Sat, 29 Jan 2005 14:31:53 +0000 (GMT) (envelope-from s_sourceforge@nedprod.com) Received: from kate (res04-ned6.res.st-and.ac.uk [138.251.234.67]) by bute.st-andrews.ac.uk (8.9.1a/8.9.1) with SMTP id OAA20208 for ; Sat, 29 Jan 2005 14:28:51 GMT From: "Niall Douglas" To: freebsd-threads@freebsd.org Date: Sat, 29 Jan 2005 14:31:12 -0000 MIME-Version: 1.0 Message-ID: <41FB9E30.1726.48C69D9F@localhost> Priority: normal X-mailer: Pegasus Mail for Windows (4.21c) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body Content-Transfer-Encoding: 7BIT Subject: Trying again: select() should be a cancellation point X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Jan 2005 14:31:54 -0000 As no one replied last time, here's this email again. I've found that I cannot work around select() not being a cancellation point on FreeBSD in my code - I had to #ifdef __FreeBSD__ in a hack which manually calls pthread_testcancel() every second. This is *nasty*! If there's any alternative, I'd very much like to hear it. Preferably I'd like to see select() made a cancellation point or a new form of select() eg; select_tc() added. Cheers, Niall > According to: > > http://lists.freebsd.org/pipermail/freebsd-threads/2004- > October/002572.html > > ... it is. But v5.3 FreeBSD doesn't cancel during select(), nor > during recv(). > > OTOH I have other documentation which suggests that neither select() nor > recv() are cancellation points. > > Oh and on Linux, both are cancellation points. In my mind it's > probably more useful if they are cancellation points as you can > always disable cancellation around them if necessary whereas the > opposite is not true. > > Cheers, > Niall >