Re: [linux-audio-dev] pthreads and signals

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

Subject: Re: [linux-audio-dev] pthreads and signals
From: David Olofson (david_AT_olofson.net)
Date: Thu May 15 2003 - 11:35:29 EEST


On Wednesday 14 May 2003 23.52, Ingo Oeser wrote:
> On Wed, May 14, 2003 at 05:49:42PM +0200, David Olofson wrote:
> [SDL Parachute on SEGV]
>
> > Yeah... However, I realized why it doesn't do anything special:
> > It cleans up and terminates the application before leaving the
> > signal handler, so it never runs into the "life after death"
> > problem.
>
> If your users in a threaded environment have tried to corrupt
> memory this is a very sensible thing you can do, since you cannot
> trust your own address space anymore.
[...]

Of course - and the best solution is to never have bugs in the first
place. ;-)

Seriously though, even if you're going to save data to an emergency
save file or something, this is the way to go. The more code you
execute before saving the data, the bigger the risk that whatever
happened before the segfault causing further data corruption.

Freeze - Save - Exit. :-)

//David Olofson - Programmer, Composer, Open Source Advocate

.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---


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

This archive was generated by hypermail 2b28 : Thu May 15 2003 - 11:38:48 EEST