freebsd shutdown fix for Pinba Engine small patch

1 view
Skip to first unread message

Slach

unread,
Nov 9, 2009, 9:53:19 AM11/9/09
to Pinba Engine development list
just small fix for correct shutdown MySQL with Pinba Engine under
FreeBSD

--- ha_pinba.cc Mon Nov 9 14:52:52 2009 UTC
+++ ha_pinba.cc Mon Nov 9 14:53:32 2009 UTC
@@ -283,6 +283,7 @@
int error = 0;
DBUG_ENTER("pinba_engine_shutdown");

+ pthread_detach(collector_thread);
pthread_cancel(collector_thread);
pthread_join(collector_thread, NULL);

Antony Dovgal

unread,
Nov 9, 2009, 10:16:44 AM11/9/09
to pinba-...@googlegroups.com
On 09.11.2009 17:53, Slach wrote:
> + pthread_detach(collector_thread);
> pthread_cancel(collector_thread);
> pthread_join(collector_thread, NULL);

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

Reply all
Reply to author
Forward
0 new messages