Get Buffering Parameters From an Open `FILE*`

前端 未结 1 1875
我寻月下人不归
我寻月下人不归 2021-01-21 01:56

In C, we can use setvbuf(...) to set a buffer, its size, and a buffering mode. I am surprised to find that no one has asked how to read these values, given an open

相关标签:
1条回答
  • 2021-01-21 02:53

    I don't think its available as part of the standard. However Solaris has introduced some non standard mechanism to query few of these properties which are also available in GNU C compiler.

    Check this for more details: https://www.gnu.org/software/libc/manual/html_node/Controlling-Buffering.html

    I was curious to know the use case where you want to do a getvbuf(..) kind of stuff.

    0 讨论(0)
提交回复
热议问题