I have a program (written in c) which can save files. It runs on red hat linux 7
Now at certain moments the customer wants to make a backup of the files. How can I be sure that my program isn't writing a file at that time : since I write my files line by line (I don't have one big buffer, I open a file, write line by line and then close it), I can be that at the time of the automateed backup, there is only half a file present since the program is still writing.
Are there some known solutions to this problem ?