I want to take backup of a file once it reaches a particular size. The file is associated with stdout stream for multiple process.
I doubt if freopen can be used in this case as it is associated with multiple process.
Though it may succeed with the process which executing that, other process references for stdout going to NULL on UNIX platform. I don't know how it behave on windows.
Renaming that file also not allowing on windows as multiple process are opened that file.
Is there any way to forcefully rename of the file.? On Unix, if I move the file all the process are referring the moved file. This also fine, later I have a mechanism to inform other process to reopen the file.
How to achieve this on windows with C programming.