If fclose(0) is called, does this close stdin?

后端 未结 4 905
既然无缘
既然无缘 2021-02-13 22:22

If fclose(0) is called, does this close stdin?

The reason why I\'m asking this is that for some reason, stdin is being closed in my application and I cannot figure out

4条回答
  •  野性不改
    2021-02-13 23:08

    The following closes stdin: close(0); fclose(stdin); close(STDIN_FILENO); daemon(0, 0);

提交回复
热议问题