发个在linux下用python写守护进程的好东东(转)
一个别人写的模块,可以直接用来把一个普通进程改为守护进程。
并且自动把标准输出重定向到日志文件,很实用啊。
view plaincopy to clipboardprint?
<BR>
'''''<BR>
This module is used to fork the current process into a daemon.<BR>
Almost none of this is necessary (or advisable) if your daemon <BR>
is being started by inetd. In that case, stdin, stdout and stderr are <BR>
all set up for you to refer to the network connection, and the fork()s <BR>
and session manipulation should not be done (to avoid confusing inetd). <BR>
Only the chdir() and umask() steps remain as useful.<BR>
References:<BR>
UNIX Programming FAQ<BR>
1.7 How do I get my program to act like a daemon?<BR>
[url]http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16[/url]<BR>
Advanced Programming in the Unix Environment<BR>
W. Richard Stevens, 1992, Addison-Wesley, ISBN 0-2
相关文档:
总览
用iptables -ADC 来指定链的规
则
,-A添加 -D删除 -C 修改
iptables - [RI] chain rule num rule-specification[option]
用iptables - RI 通过规则的顺序指定
iptables -D chain rule num[option]
删除指定规则
iptables -[LFZ] [chain][option]
用iptables -LFZ 链名 [选项]
iptables -[NX] chain
用 -NX ......
来源:http://linux.chinaunix.net/ebook/doc/2009/09/17/1135830.shtml
本文介绍在centos 5.x环境下通过yum源的扩展使用munin、 monit、ntop工具来监管你的应用程序和服务器。题为懒人说说的是简便的安装方式而已,将强大的功能配置简单的应用起来是很重要的,可以节省时间并提高效率。
Monit:http:#www.tildeslas ......
在开发过程中,必然会出现多人同时工作、协着的情况,在嵌入式开发项目中更为平常,这样可以加快项目周期,为产品上市占得时间先机。目前,使用linux作为开发产品的操作系统情况越来越多,使用越来越广泛。为了交叉编译,为了最接近开发目标,我们一般都会自己搭建一台linux开发服务器。linux开发服务器 ......