Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Testing unexpected I/O failures

by bliako (Monsignor)
on Nov 24, 2020 at 11:22 UTC ( [id://11124124]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11124124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (3)
As of 2024-04-26 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found