Subj : Re: pthread_mutex_lock throws an exception on receiving signal 15 To : comp.programming.threads From : Paul Pluzhnikov Date : Wed Sep 21 2005 10:59 am "pankaj-startup" writes: > Suppose a parentThread has one function which spwans a childThread. If > i dont try/catch exception in childThread, then would exception raised > in childThread be catched in parentThread try/catch (assuming that > parentThread waits further after spwaning childThread)? No. >> Attempting to lock a mutex in an >> async-signal context is definitely not a good idea. > > Why so? can you please elaborate a little bit? There is a very small set of async-signal safe functions, a list of which can be found e.g. here: http://vip.cs.utsa.edu/classes/cs3733f2003/notes/USP-08.html None of the pthread_* functions are in that list, and the result of calling any of them in async-signal context is undefined: your program may appear to work, or it may crash, or hang, or it may melt your CPU. Cheers, -- In order to understand recursion you must first understand recursion. Remove /-nsp/ for email. .