How can you flush a write using a file descriptor?

前端 未结 6 1595
后悔当初
后悔当初 2020-11-29 03:46

It turns out this whole misunderstanding of the open() versus fopen() stems from a buggy I2C driver in the Linux 2.6.14 kernel on an ARM. Backporting a worki

6条回答
  •  既然无缘
    2020-11-29 04:27

    It sounds like what you are looking for is the fsync() function (or fdatasync()?), or you could use the O_SYNC flag in your open() call.

提交回复
热议问题