Exception mv()在阅读时

Exception mv()在阅读时,exception,interrupt,Exception,Interrupt,在Linux ext3文件系统上,如果在读取文件时对同一文件(文件描述符)调用mv(),会发生什么情况?这实际上是一道考试题,我只能说: CPU陷阱用于中断处理的操作系统 等等等等 如果操作系统的人能帮我,我将不胜感激,请:D 这就解释了其中的大部分细节 If one or more processes have the file open when the last link is removed, the link shall be removed before rename() retur

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

  • CPU陷阱用于中断处理的操作系统
  • 等等等等
  • 如果操作系统的人能帮我,我将不胜感激,请:D

    这就解释了其中的大部分细节

    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. 
    

    这是标准库函数还是shell命令?当您尝试它时,发生了什么?您可能是指
    rename()
    (系统校准)或
    mv
    (用户命令)。在任何情况下,我不认为中断处理是你应该关心的事情。找出文件系统是否允许该操作从开始可能更重要。@Matti mv()是std lib的函数,在某些程序中是一个系统调用@S.Lott mv()编辑了文件,但读取()仍在继续,好像什么都没发生(输出和一切都如预期的那样)@Alex是的,但我想我会坚持@WhirlWind的答案:D我明天有函数编程考试!!!:)第二天是OS!!!谢谢大家的帮助,干杯!!!