ok, danke -
die man page pthread_join(3) kenne ich, aber schlauer war ich daraus auch nicht geworden. Dort heißt es ja gerade
If retval is not NULL, then pthread_join() copies the exit status of the target thread (i.e., the value that the target thread supplied to pthread_exit(3)) into the location pointed to by *retval. If the target thread was canceled, then PTHREAD_CANCELED is placed in *retval.
Zum Einen benutze ich nun kein pthread_exit((), sondern ausschließlich pthread_cancel().
Zum Anderen: was genau muss ich tun, um retval auswerten zu können? Ich möchte ja gerade wissen, ob irgendwo was anderes als der Nullpointer steht. Genau diese Info fehlt mir ja noch.