Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: fsyncing directories

by betterworld (Deacon)
on Apr 27, 2010 at 13:26 UTC ( #837101=note: print w/ replies, xml ) Need Help??


in reply to Re: fsyncing directories
in thread fsyncing directories

Thank you, this is a nice workaround :) IO::Handle accepts this file handle because it thinks that it is opened for writing.

From the strace output it seems that this does in fact fsync the directory. Excerpt:

open("/etc/", O_RDONLY) = 3 dup(3) = 4 fsync(4) = 0

I don't think the dup() hurts the functionality. Though of course I cannot be sure because I'd have to crash my system repeatedly to see if the effect is the same.


Comment on Re^2: fsyncing directories
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (15)
As of 2015-07-07 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (93 votes), past polls