当前位置: 技术问答>linux和unix
守护进程的错误重定向问题
来源: 互联网 发布时间:2015-09-18
本文导语: #include #include #include #include #include #include #include int main(int argc,char **argv) { struct sigaction act; int error,in,out; time_t now; int memory; if(fork()!=0) exit(1); if(setsid()
#include
#include
#include
#include
#include
#include
#include
int main(int argc,char **argv)
{
struct sigaction act;
int error,in,out;
time_t now;
int memory;
if(fork()!=0) exit(1);
if(setsid()
#include
#include
#include
#include
#include
#include
int main(int argc,char **argv)
{
struct sigaction act;
int error,in,out;
time_t now;
int memory;
if(fork()!=0) exit(1);
if(setsid()