3d46251c4e
Put thread in a detached state when calling pthread_create otherwise in some circumstances, thread can end before the call to pthread_detach. (cherry picked from commit dc4eda529f1da881cb986b95c6352583f120dd39)