1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Q for Rex about @LINES

Discussion in 'Plugins' started by vefatica, Feb 9, 2016.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,888
    Likes Received:
    30
    I have a plugin which opens a file with FILE_SHARE_READ | FILE_SHARE_WRITE. While the file is open, I can TYPE it (or HEAD, or TAIL, in the current TCC or in another instance). But I can't use @LINES on it (current or other instance). When I try, I get
    Code:
    TCC: (Sys) The process cannot access the file because it is being used by another process.
    What's up with that?
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,809
    Likes Received:
    82
    @LINES (and @LINE) opens the file with _SH_DENYWR. This is WAD; retrieving lines when the file is actively being written is highly problematic (and had caused user problems & complaints previously when @LUINE / @LINES didn't enforce that).
     

Share This Page