守护进程(daemon)很简单------第一次玩setsid函数

       守护进程, 说白了, 就是已经成年的进程, 比较独立, 切割了一切与父进程相关的东西。 一般, 咱们能够在孤儿进程的基础上作文章, 以下:ssh #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <sys/types.h>
相关文章
相关标签/搜索