damn.
i think thats is a great method.
I would have just let a segfault deadlock all the other threads. after all, if one crashes, they''re all buggy...
nice
![](smile.gif)
does it work?
or, ooh. I don''t know how the mutex locking mechanism works, but might there be a race condition with multiple threads recieving EOWNERDEAD and all of them trying to fix the memory at once?
I''m not sure how the othre threads are getting this error (i''ve only used pthreads vaguely), but if multiple might get it at once, then you might need a "fixing the memory after a fault" mutex in order for the correction function to run.
Of course, then a thread might segfault while running that (say corrupted data)... maybe just deadlock at this point? or better. All Threads die, so the error is immediately evident.