1

With respect to this excellent post:

What's the difference between nohup and a daemon?

I would like to ask the following:

After launching an application from my terminal, the application keeps running either in the background or the foreground and the only thing I can do to interact with it is by sending it signals from my terminal (given that stdin is still in place).

However, after a daemon process is launched, I realized that it can be controlled with other means like querying it or restarting it (arch way):

# /etc/rc.d/daemon-name {start|stop|restart|status|...}

Could someone explain to me if that feature is built-into the general "daemon framework" and applies to every daemon process as a special feature or is it just a provision that processes designed to run as a daemon will have to handle internally?

And to add more to the matter, how on earth are we able to "control" daemons from the terminal using their name (i.e. sambad stop) while applications always have to be referred using their name (i.e. kill -9 1234)?

Thank you in advance!

Community
  • 1
  • 1
stratis
  • 7,750
  • 13
  • 53
  • 94

1 Answers1

2
# /etc/rc.d/daemon-name {start|stop|restart|status|...}

it is not a querying to the daemons directly. It is launching scripts by standart interface and these scripts in turn operate with daemon process by PID and signals. This scripts are creating during installation process of daemons-programs.

Lev
  • 29
  • 2