- 论坛徽章:
- 0
|
fsync
This function is a cancellation point in multi-threaded programs. This is a problem
if the thread allocates some resources (like memory, file descriptors, semaphores or
whatever) at the time fsync is called. If the thread gets canceled these resources stay
allocated until the program ends. To avoid this, calls to fsync should be protected
using cancellation handlers.
这里大概说的是一个这样的问题,如果线程申请了一些资源,当进行fsync调用的时候,如果线程收到取消信号, 则这些资源,
只有当程序结束,才能自动释放? 后面的意思,是什么呢? 没明白,正确的代码,应该如何写呢?。。{:3_184:} ,英文不怎么过关,见笑了。。 |
|