[linux-audio-dev] How to kill a rogue (p)thread
Jack O'Quin
joq at io.com
Thu Apr 1 02:21:20 UTC 2004
Arve Knudsen <aknuds-1 at broadpark.no> writes:
> What about pthread_kill with a user defined signal (SIGRTMIN <= sig <=
> SIGRTMAX), where the handler will call pthread_exit? Then the
> registered cleanup functions should be invoked as usual.
That might be better. I haven't tried doing it that way, myself. For
a watchdog timeout you might want to use SIGABRT. It can be useful to
dump core in these cases.
> Of course I could provide extension functions accepting a PaStream *
> instead, I think it would be a better idea. You would have to include
> pa_linux_alsa.h. Eventually I'm thinking this stuff should be part of
> the common pa_unix utility functions, so an extension for the UNIX
> implementations could be introduced.
That sounds fine.
Ross and the other PA developers have thought carefully about what to
make generic and what should be system-dependent, AFAICT.
--
joq
More information about the Linux-audio-dev
mailing list