1

Linux ext3 ファイルシステムで、ファイルの読み取り中に同じファイル (ファイル記述子) で mv() が呼び出されるとどうなりますか? これは実際には試験問題であり、次のようなことしか言えません。

  1. CPU は、割り込み処理のために OS をトラップします
  2. などなど

そこにいるOSの人たちが私を助けてくれれば幸いです:D

4

1 に答える 1

3

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. 
于 2010-05-14T20:07:01.140 に答える