Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jan 2005 14:31:12 -0000
From:      "Niall Douglas" <s_sourceforge@nedprod.com>
To:        freebsd-threads@freebsd.org
Subject:   Trying again: select() should be a cancellation point
Message-ID:  <41FB9E30.1726.48C69D9F@localhost>

next in thread | raw e-mail | index | archive | help
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
> 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41FB9E30.1726.48C69D9F>