in reply to Re^2: Monitoring directory for new files
in thread Monitoring directory for new files

If that's not true, then what happens? I figure the reading process will keep trying to read until EOF. It will not see EOF until the other process which is writing the file has closed it. I could be mistaken, but again if it doesn't work like this, then what happens in the "reading process"?

So basically, yes this is like a pipe. I think Ikegami's test is correct.

  • Comment on Re^3: Monitoring directory for new files

Replies are listed 'Best First'.
Re^4: Monitoring directory for new files
by ikegami (Patriarch) on Jan 20, 2010 at 15:53 UTC

    You are mistaken. Tested on Win and Linux.

    It stops reading when it reaches the current EOF, saying that it reached EOF. It doesn't matter that some process still has an open file handle to the file.

    If it was a pipe or socket, it would block as you describe.