Solved

Change forked process' name

Posted on 2007-11-18
3
1,114 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
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now