Subj : Re: pthread_mutex_lock throws an exception on receiving signal 15 To : comp.programming.threads From : pankaj-startup Date : Tue Oct 04 2005 12:25 pm Paul Pluzhnikov wrote: > Signal handler can't legally call pthread_create() (or any other > pthread function). > Oh! my mistake, I forgot about pthread_create :) > > In exit, while cleanup, something goes wrong here and main thread > > catches a exception. > > You invoked undefined behaviour, and now you are surprized? > You have only yourself to blaim :( > I was under impression that "undefined behaviour" means call to particular unsafe function fails (in this case pthread_create) Then what should be in signal handler? -> cancel(set appropriate flag) all threads, & exit ? Can you please give me some pointers why these few functions are Unsafe in the context of asyn signal handler? > Cheers, > -- > In order to understand recursion you must first understand recursion. > Remove /-nsp/ for email. .