Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1123
  • Last Modified:

Change forked process' name

Hi all

OS: RHEL4

Is there a way to change a forked process` name?

I have seen this behavior by a lot of daemons, and a daemon is what I'm making.

I have one main thread that listens for incoming connections, then spawns a child to deal with it. I would like the child to show up in TOP as

mydaemon serving <hostname>

Most I could find were some shady links on Google pertaining C programming.

Good luck!
0
x_terminat_or_3
Asked:
x_terminat_or_3
1 Solution
 
ravenplCommented:
http://manpages.courier-mta.org/htmlman2/prctl.2.html
But it works for 2.6.9+
Otherwise You can't, except the following may (maybe) work http://www.uofr.net/~greg/processname.html
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now