CJ <di*********@invalid.invalidwrites:
I've run across the following situation. I have two threads, say T1 and
T2 which access shared data - each locks a mutex before doing so.
Now I have a hard-to-find bug which means that periodically T1 gets
killed unexpectedly. But if it holds the mutex at that point, T2 blocks
for ever!
How can I get T1 to release any locks it's holding when it gets killed?
Standard C has no threads, so comp.lang.c isn't the place to ask about this.
I've redirected followups to just comp.unix.programmer (not that it
will do any good), but comp.programming.threads might also be a good
place to ask.
--
Keith Thompson (The_Other_Keith)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"