New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set the thread name before detaching the thread #2762
Conversation
4faf148
to
ae32669
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. It looks like clang-format is required.
@kwiatrox I rebased on the current master, now the format is OK. Can you please approve once again, after the tests have run? |
@mrunge You have merged some PRs lately, can you please merge this PR too? It's already approved. |
0bec1c8
to
730ea63
Compare
pthread_setname_np() does not work reliably when a thread has been created in a detached state. Set the thread name first, and then call pthread_detach() afterwards (if necessary). This prevents error messages like this one: set_thread_name("unixsock conn"): No such process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pthread_setname_np()
does not work reliably when a thread has been created in a detached state. Set the thread name first, and then callpthread_detach()
afterwards (if necessary).This prevents error messages like this one:
ChangeLog: Fix a race condition when setting thread names