Before applying this patch I would like to understand why is it required to detach a thread before cancelling it.
Such requirement doesn't seem to exist in other OSes.
It seems to me that we need to do some research instead of blindly applying a mysteriously working patch.
Try also the following patch:
http://dev.daylessday.org/diff/freebsd_pthread.diff
--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP