Chinaunix首页 | 论坛 | 博客
  • 博客访问: 968710
  • 博文数量: 200
  • 博客积分: 5011
  • 博客等级: 大校
  • 技术积分: 2479
  • 用 户 组: 普通用户
  • 注册时间: 2008-06-27 15:07
文章分类

全部博文(200)

文章存档

2009年(12)

2008年(190)

我的朋友

分类:

2008-11-18 15:48:19

题 5.6:

How would you use the fsync function () with a standard I/O stream?

answer:

Call fsync after each call to fflush. The argument to fsync is obtained with the fileno function. Calling fsync without calling fflush might do nothing if all the data were still in memory buffers

fflush是将数据从standard i/o 的缓冲写入kernel的缓冲,然后fsync是将kernel的缓冲写入disk.

阅读(487) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~