dsv*_*son 13 c unix linux pthreads introspection
通过使用prctl或pthread_set_name_np等函数,可以更改线程的名称.至少在Linux 2.6.38中,两个函数强加的限制是名称不能超过15个字符(NULL终止是第16个字节).
这15个字符的限制在哪里,是否有任何(甚至非正统的)方式?
更新:
正如评论中所提到的,这是由内核强加的.
定义可以在这里找到:http: //lxr.linux.no/linux+v2.6.37/include/linux/sched.h#L245