<p>On <strong>Linux/NPTL</strong>, threads are created as some kind of process.</p>
<p>I can see some of my process have a weird cmdline:</p>
<pre><code>cat /proc/5590/cmdline 
hald-addon-storage: polling /dev/scd0 (every 2 sec)
</code></pre>
<p>Do you have an idea how I could do that for each thread of my process? That would be very helpful for debugging.</p>
<p><em>/me now investigating in HAL source</em></p>

```
argv
```
points to writable strings. Just write stuff to them:
```
```
#include <string.h>
#include <unistd.h>

int
main(int argc, char** argv)
{
    strcpy(argv[0], "Hello, world!");
    sleep(10);
    return 0;
}
```
```