#include <unistd.h>
int daemon(int nochdir,int noclose)
在创建精灵进程的时候,往往需要将精灵进程的工作目录修改为"/"根目录
并且将标准输入,输出和错误输出重定向到/dev/null
daemon的作用就是当参数nochdir为0时,将根目录修改为工作目录
noclose为0时,做输入,输出以及错误输出重定向到/dev/null
执行成功返回0
错误返回-1 ......
string strMetadataPath = str(boost::format("%s/DCManager.xml") % PATH_METADATAFILE);

相关文章:

  • 2021-08-26
  • 2022-02-20
  • 2021-06-16
  • 2022-12-23
  • 2021-11-25
  • 2021-07-27
  • 2021-06-02
  • 2021-12-31
猜你喜欢
  • 2022-01-04
  • 2022-12-23
  • 2022-02-06
  • 2022-03-03
相关资源
相似解决方案