On Linux/NPTL, threads are created as some kind of process.
I can see some of my process have a weird cmdline:
cat /proc/5590/cmdlin
argv points to writable strings. Just write stuff to them:
argv
#include #include int main(int argc, char** argv) { strcpy(argv[0], "Hello, world!"); sleep(10); return 0; }