Hi! > >> 2. So you're saying that none of the pthread(5) functions provide > >> useful diagnostics, even though the manpages claim they should (in > >> many cases)? That seems like a bug with the pthreads implementation to > >> me... > > > > Not at all, as far as I understand this they just return error as > > integer value from function to indicate the error, most likely due to > > problems with errno and race conditions as program runs in more threads, > > so they are not touching errno that is later picked up by perror() call. > > So you would get: > > > > "pthread_xxx_xxx() failed: Success" > > > > or any previous errno that was there instead of: > > > > "pthread_xxx_xxx() failed: Invalid value" > > > > I'm just saying that you should not use perror() for pthread functions > > but rather use value returned from such function. > > Good point. We probably should save the errno, then quickly print > out the resulting error.
That's what print_error() function in that patch does. ;) -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
