in reply to Re^2: Testing unexpected I/O failures
in thread Testing unexpected I/O failures

So, do you want to be able to test what happens (or detect it) when within these few CPU cycles some other process modifies the file while your Perl process does IO? Or do you want to ignore this risk?

As a side remark, on top of race conditions you also have buffered IO routines. Do these keep IOing even if the file is gone / file permissions changed until the buffer is exhausted? If that's the case you will always get a delayed picture.

Replies are listed 'Best First'.
Re^4: Testing unexpected I/O failures
by kcott (Archbishop) on Nov 24, 2020 at 20:29 UTC

    G'day bliako,

    I'm really just interested in detecting a change rather than investigating who or what effected the change. In the unlikely event that this issue occurs frequently, that focus may change.

    My reponse to ++Fletch's reply has a bit more detail about what's going on. At this stage, his suggestion is the one I'm most likely to implement.

    — Ken