Skip to content
Advertisement

Tag: fsync

Redirected output from a subprocess call getting lost?

I have some Python code that goes roughly like this, using some libraries that you may or may not have: Basically, I’m starting a subprocess that’s supposed to go download some data for me and print it to standard out. I’m redirecting that data to a file, and then, as soon as the subprocess call returns, I’m closing my handle

Is rename() without fsync() safe?

Is it safe to call rename(tmppath, path) without calling fsync(tmppath_fd) first? I want the path to always point to a complete file. I care mainly about Ext4. Is the rename() promised to be safe in all future Linux kernel versions? A usage example in Python: Answer No. Look at libeatmydata, and this presentation: Eat My Data: How Everybody Gets File

Advertisement