how to make a process daemon

前端 未结 2 1458
南方客
南方客 2020-12-04 06:17

I am trying to understand how can I make my program a daemon.So some things which I came across are In general, a program performs the following steps to become a daemon: <

2条回答
  •  情歌与酒
    2020-12-04 06:55

    If you are looking for a clean approach please consider using standard api- int daemon(int nochdir, int noclose);. Man page pretty simple and self explanatory. man page. A well tested api far outweigh our own implementation interms of portability and stability.

提交回复
热议问题