mv()在阅读时

时间:2010-05-14 19:47:15

标签: exception interrupt

在Linux ext3文件系统上,如果在读取文件时在同一文件(文件描述符)上调用mv()会发生什么?这实际上是一个考试问题,我只能这样说:

  1. CPU陷阱OS用于中断处理
  2. 等等。
  3. 我很感激,如果那里的操作系统人员可以帮助我,请:D

1 个答案:

答案 0 :(得分:3)

Linux rename man page:

这解释了大部分细节。

If one or more processes have the file open when the last link is removed,
the link shall be removed before rename() returns, but the removal of the
file contents shall be postponed until all references to the file are closed. 
相关问题