is there anyone here who has any idea how to handle segv's in a
linuxthreads-using application? i know that many of you are aware that
i've used threads a lot in my apps, and grappled with lots of tricky
signal related issues. however, i continue to see something really
deeply ugly in linuxthreads: segfaults seem not to be handled in the
same way as other signals. when a thread in ardour causes a segfault,
that thread is killed (actually, it becomes a zombie, waiting for its
parent to exit) and thats the end of the signal handling. for all
other signals, my code causes them are delivered to a single thread
that is waiting on all waitable signals except SIGCHLD, and we get
control there in a useful way.
its very distressing: a segfault will cause ardour to cease normal
operation, but nothing knows it has happened. if its in (say) the disk
butler thread, the GUI will continue working normally, but nothing
will actually do the right thing.
has anybody come up with code in which segfaults within threads are
handled? i have a few ideas on an approach that might work, but i'm
asking first :)
nb. this is true in JACK as well.