20
I have a multithread application and I would like that htop (as example) shows a different name per each thread running, at the moment what it shows is the "command line" used to run the main.
I have tried using
prctl(PR_SET_NAME, .....)
but it works only with top and with that call is only possible specify names up to 16 bytes.
I guess the trick is to modify the /proc/PID/cmdline content but that is a readonly field.
Anyone knows how to achieve it ?