- ret = pthread_setname_np(pthread_self(), DEFAULT_RUN_AS_WORKER_NAME);
- if (ret) {
- errno = ret;
- ret = -1;
- PERROR("pthread_setname_np");
- return EXIT_FAILURE;
+ ret = lttng_prctl(PR_SET_NAME,
+ (unsigned long) DEFAULT_RUN_AS_WORKER_NAME, 0, 0, 0);
+ if (ret && ret != -ENOSYS) {
+ /* Don't fail as this is not essential. */
+ PERROR("prctl PR_SET_NAME");