摘自:https://blog.csdn.net/zhangqingsup/article/details/6668203?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-4.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-4.control

 fcntl(fd, F_SETFD, FD_CLOEXEC); // 这里设置为FD_CLOEXEC表示当程序执行exec函数时本fd将被系统自动关闭,表示不传递给exec创建的新进程, 如果设置为fcntl(fd, F_SETFD, 0);那么本fd将保持打开状态复制到exec创建的新进程中

相关文章:

  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2021-11-19
  • 2021-04-28
猜你喜欢
  • 2021-09-01
  • 2022-03-03
  • 2022-01-02
  • 2021-05-25
  • 2022-12-23
  • 2021-11-02
  • 2021-12-29
相关资源
相似解决方案