1 2 3 4 5 6
#define _GNU_SOURCE #include <pthread.h> int main(int argc, char **argv) { pthread_setname_np(pthread_self(), "ducks"); return 0; }