Solved

Change forked process' name

Posted on 2007-11-18
3
1,119 Views
Last Modified: 2008-10-10
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
Comment
Question by:x_terminat_or_3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 20310854
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question