Forum Discussion

hpxwj's avatar
hpxwj
Copper Contributor
Nov 17, 2021
Solved

Why several system processes can access a file at the same time in Win10?

 

  • hpxwj 

    Check this StackOverflow post: https://stackoverflow.com/questions/13420057/view-open-file-handlers-for-a-process-on-windows

4 Replies

  • Kuinox's avatar
    Kuinox
    Copper Contributor

    Hello hpxwj,

    When a process access a file, it ask the OS to lock for it. 

    Often, the processes does not ask for an exclusive lock and multiple processes can access the files at the sames time. 
    https://en.wikipedia.org/wiki/File_locking#In_Microsoft_Windows

    For example, one process can lock a file for write, while allowing any other process to read the file.

     

    • hpxwj's avatar
      hpxwj
      Copper Contributor
      Hello,Kuinox,
      How can I check which process access this file actually?
      • Kuinox's avatar
        Kuinox
        Copper Contributor

        hpxwj 

        Check this StackOverflow post: https://stackoverflow.com/questions/13420057/view-open-file-handlers-for-a-process-on-windows

  • hpxwj's avatar
    hpxwj
    Copper Contributor
    How can I check which process access this file actually?

Resources