pthread_t single_thread ;
pthread_create (&single_thread , NULL , &mywriter , 0) ;
void * ignore ;
pthread_join (single_thread , &ignore) ;
I have this code above, what is the purpose of defining void* ignore and do join of it?
I get a segmentation fault while using it.
The point of the second argument is to get the returning argument from the thread.
Something like an exit code. But since this could also be the address of an object you are returning it is a
void**so you can modify thevoid*. If you look at the signature it is actually avoid**that the function expects and you are passing to it.If you don’t need it, as i think is your case. Just pass
nullMan: pthread_join