[linux-audio-dev] pthreads and signals

Ingo Oeser ingo.oeser at informatik.tu-chemnitz.de
Thu May 15 15:12:01 UTC 2003


On Thu, May 15, 2003 at 10:39:45AM +0200, David Olofson wrote:
> On Wednesday 14 May 2003 23.52, Ingo Oeser wrote:
> [...]
> > Re-exec is an alternative I could envision for realtime.
> 
> Further thoughts on that:
> 
> If you have a setup with multiple redundant processes and/or machines, 
> the obvious job for the "crash handler" is to tell some other process 
> or machine to take over. (This could be a matter of sending some 
> commands to a hardware mixer or "router".) After that, you should 
> just get out of the way ASAP, and maybe restart.

If you are talking HA, then the other processes (or some kind of
monitor in a more fragile solution) should detect the failure and
take over.

If you crash, then you cannot trust your addressspace anymore.

Detecting a crash is very simple for the other process: Just have
a never to be used pipe open and detect SIGCHLD or SIGPIPE. Then
you even know, which one of processes died.

Cannot do that with threads? What a pity...

Anything more sophisticated, which involves data from the
segfaulting process asks for trouble. 

Re-exec means, that you just trust your read-only segment, which
is a good assumption until hardware memory errors exist. If they
exist, you have other problems. I'm talking about exec called
with read-only constants, to clarify that.

Regards

Ingo Oeser



More information about the Linux-audio-dev mailing list