在控制后台程序和放大器的差异;应用 [英] Differences in controlling daemons & applications

查看:101
本文介绍了在控制后台程序和放大器的差异;应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于这个优秀的帖子:

<一个href=\"http://stackoverflow.com/questions/958249/whats-the-difference-between-nohup-and-a-daemon\">What's的nohup和守护进程之间的区别?

我想问一下以下内容:

这是我的终端启动应用程序后,应用程序继续运行无论是在背景或前景和我能做通过发送它从我的终端信号进行交互与它是唯一的事情(因为标准输入还是很到位)

然而,一个守护进程启动后,我意识到,它可以用其他方式,比如查询,或重新启动它(弓的方式)来控制:

#{/etc/rc.d/daemon-name开始|停止|重启|状态| ...}

如果该功能被内置于一般的守护进程框架,并适用于每一个守护进程作为一个特殊的功能,或者是它只是过程,旨在作为后台进程运行将不得不在内部处理的规定给我有人能解释一下?

和添加更多的事,如何在地球上,我们才能控制用他们的名字(即sambad停止)从终端后台程序同时应用程序总是要使用他们的名字简称(即杀-9 1234) ?

感谢你在前进!


解决方案

 #{/etc/rc.d/daemon-name启动|停止|重启|状态| ...}

这不是一个查询直接守护进程。它是由非标准的接口启动脚本和这些脚本反过来通过PID和信号守护进程运行。这个脚本时的守护程序的程序安装过程中创建。

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!

解决方案

# /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.

这篇关于在控制后台程序和放大器的差异;应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆