守護進程(daemon)很簡單------第一次玩setsid函數

       守護進程, 說白了, 就是已經成年的進程, 比較獨立, 切割了一切與父進程相關的東西。 一般, 咱們能夠在孤兒進程的基礎上作文章, 以下:ssh #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <sys/types.h>
相關文章
相關標籤/搜索