I developed a program which create a thread at the beginning. And then I want to kill the thread with pthread_cancel()
when the thread is running.
BUt if I do this I get a crash. this crash is not always reproduced. some time the program avoid the crash.
I see some where that pthread_cancel()
could cause a crash if the cancelled thread is running a system call. is it truth ?
dmesg shows the following error
myprogramd[1965]: segfault at c ip b76cdef3 sp bfcd5780 error 4 in libpthread-0.9.30.1.so[b76c6000+a000]