Does pthread_set_name_np() work?

John Baldwin jhb at freebsd.org
Tue Sep 3 20:23:32 UTC 2013


On Wednesday, August 21, 2013 12:36:09 pm Laurie Jennings wrote:
> Im trying to set the names of threads so I can distinguish them in top -H, 
but it doesn't seem to 
> take the thread id as valid.
> 
> err=pthread_set_name_np(pthread_self(),"FOO");

This function returns void, not an error, so you can't trust the return value.

-- 
John Baldwin


More information about the freebsd-net mailing list