Re: [linux-audio-dev] How to kill a rogue (p)thread

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] How to kill a rogue (p)thread
From: Jack O'Quin (joq_AT_io.com)
Date: Thu Apr 01 2004 - 05:21:20 EEST


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


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Thu Apr 01 2004 - 05:24:03 EEST