Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Linux ext3 文件系统上,如果在读取文件时对同一文件(文件描述符)调用 mv() 会发生什么?这实际上是一道考试题,我只能说:
如果那里的操作系统人员可以帮助我,我将不胜感激:D
Linux 重命名手册页:
这解释了大部分细节。
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.