I think the canonical way to get this behavior is to write an even
simpler program:
open specified output file from other program
while (interested) {
fsync(file)
sleep (120 or whatever seconds)
}
fsync() will store the file to the server where other clients can read it.
Craig