Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-22-2007, 12:32 AM   #1
LQ Newbie
Registered: Jan 2007
Posts: 20

Rep: Reputation: 0
How to make TCP server a daemon / service much like a dhcpd service?

Hi Folks !
I have a fedora core 6 machine, kernel 2.6.18. I intend to create my TCP Server a daemon ( or a service) much like any other daemon / service like dhcpd.

Is this possible?
I want it to be able to control much like a dhcpd service is controlled ie. I should be able to start, stop and query its status as we do it with the dhcpd service.

I know i'm mixing up the 2 terms daemon and service. But I do not have any idea as to whether they are the same or different.

Please suggest how should I go about doing this. At the least I request to please direct me to some link on the net.

Thanks and regards,
Old 05-22-2007, 01:29 AM   #2
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (
Posts: 1,900

Rep: Reputation: 69 - as for links for daemon, and description of what it is. But daemon only refers to mode of running of one instance of process; there is sometimes 'daemon' utility that can run any process not requiring input/output to console as daemon.

What you want about controlling it like other system daemons, is achieved by initscripts. Look at /etc/init.d/dhcpd (or /etc/rc.d/init.d/dhcpd, it varies). It is a shell script, that can take 'start', 'stop' and 'restart' parameters (sometimes such scripts can take some other parameters, like 'reload', but are only run with a single parameter). It then loads parameters from configuration files in /etc, decides what command-line is needed for daemon and either runs it ('start') or makes it know it needs to terminate ('stop'), usually by sending a signal that daemon will proceed (read man signal) or - if it is 15 (SIGTERM), for example - which will make OS terminate daemon.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to disable TCP/IP Denial of Service mayankh Linux - Security 2 10-14-2006 04:01 AM
adding a new daemon (service) vjenks Linux - Newbie 3 02-11-2004 07:31 PM
How To Program Daemon(Service) Application wlmapp3 Programming 6 07-23-2003 03:58 PM
Service Monitoring Daemon (MON) PokerFace Programming 1 12-04-2002 11:31 AM
I want to start Snort as a service/daemon Olusegun Linux - Software 3 10-15-2002 10:35 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration