Operating System - HP-UX
1833772 Members
2317 Online
110063 Solutions
New Discussion

How modify process name in list process ?

 
Vincent Giacomini
Occasional Contributor

How modify process name in list process ?

Hi,

I would like to know how to modify (by API) the name of a process as it's appears in
ps list.

For example, pppd deamon do that

Any idea ?
Avant c'etait different, maintenant c'est different
2 REPLIES 2
Andreas Voss
Honored Contributor

Re: How modify process name in list process ?

Hi,

think this can be done only in C language:
pstat(PSTAT_SETCMD, (union pstun),len,0,0);

Regards
Stefan Farrelly
Honored Contributor

Re: How modify process name in list process ?


Not sure if you can do that, but by using exec (man 2 exec) you can replace the current running process with a new one and thus change your process name as it appears in ps.

Im from Palmerston North, New Zealand, but somehow ended up in London...