swebb2066 commented on issue #388:
URL:
https://github.com/apache/logging-log4cxx/issues/388#issuecomment-2216901619
> If you try to use one with the other It won't work.
Using the following code
```
#include <pthread.h>
#include <iostream>
int main(){
pthread_t tid = pthread_self();
pthread_setname_np(tid, "test-name");
char result[16] = {0};
pthread_t current_thread = pthread_self();
if (pthread_getname_np(current_thread, result, sizeof(result)) < 0
|| 0 == result[0])
return 1;
std::cout << "result=" << result << '\n';
return 0;
}
```
`/mingw64/bin/clang++.exe -o /tmp/test.exe test-pthread-setname.cpp`
results in
`result=test-name`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]