watchdog: fix possible segfault during cleanup. On some systems pthread_cancel(...
commita6e32eb2593a2cafea6b3920da6681f4080358a3
authorjwoithe <jwoithe@2be59082-3212-0410-8809-b0798e1608f0>
Sat, 13 Jul 2013 13:51:51 +0000 (13 13:51 +0000)
committerjwoithe <jwoithe@2be59082-3212-0410-8809-b0798e1608f0>
Sat, 13 Jul 2013 13:51:51 +0000 (13 13:51 +0000)
tree4801e8c2976e0b897d14f1ee31f23bbffe70e0df
parent3d8826ba0ef30069b1c0641241bcaa27278a86dd
watchdog: fix possible segfault during cleanup.  On some systems pthread_cancel() caused issues since the watchdog tasks did not restrict themselves to cancel-safe functions.  Resolve this using a simple message pipe so pthread_cancel() is no longer needed during watchdog shutdown.  At the time of writing, the only known distribution to trigger a segfault due to this issue was Slackware 14.0 (gcc 4.7.1, glibc 2.15).  However, the issue does appear to be real so a fix which eliminates the need to use pthread_cancel() is justified.

git-svn-id: svn+ssh://ffado.org/ffado/trunk@2344 2be59082-3212-0410-8809-b0798e1608f0
libffado/src/libutil/Watchdog.cpp
libffado/src/libutil/Watchdog.h