#include <signal.h>
#include <time.h>
-#include <vlc/vlc.h>
+#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_interface.h>
intf_sys_t *p_sys = intf->p_sys;
pthread_cancel (p_sys->thread);
+#ifdef __APPLE__
+ /* In Mac OS X up to 10.5 sigwait (among others) is not a pthread
+ * cancellation point, so we throw a dummy quit signal to end
+ * sigwait() in the sigth thread */
+ pthread_kill (p_sys->thread, SIGQUIT);
+# endif
pthread_join (p_sys->thread, NULL);
free (p_sys);
}
sigwait (&set, &signum);
+#ifdef __APPLE__
+ /* In Mac OS X up to 10.5 sigwait (among others) is not a pthread
+ * cancellation point */
+ pthread_testcancel();
+#endif
+
vlc_object_lock (obj);
p_sys->signum = signum;
vlc_object_signal_unlocked (obj);
intf_sys_t *p_sys = obj->p_sys;
vlc_object_lock (obj);
- do
+ while (vlc_object_alive (obj))
{
switch (p_sys->signum)
{
strsignal (p_sys->signum));
goto out;
}
+ vlc_object_wait (obj);
}
- while (!vlc_object_wait (obj));
out:
vlc_object_unlock (obj);