守护进程的快捷方式


1、daemon进程(守护进程)

对于C语言而言,glibc提供了daemon函数,从而帮我们将程序转化成daemon进程。

#include 
//int daemon(int nochdir, int noclose);
daemon(0,0);//写在要设置的进程里面就行了

相关