Nope, caller is no good for this. It can't be done before or after atomic_write. But the chmod is in the wrong place: it effectively makes the write non-atomic by creating a race window where the file may be non-accessible for no good reason.
I still can't make sense of the comment... Clearly "filename" is not a directory. It is the file you just wrote.
Nope, caller is no good for this. It can't be done before or after atomic_write. But the chmod is in the wrong place: it effectively makes the write non-atomic by creating a race window where the file may be non-accessible for no good reason.
I still can't make sense of the comment... Clearly "filename" is not a directory. It is the file you just wrote.