title: fopen and fwrite to the same file from multiple threads
body: <p>This is similar but a bit different to existing questions.  Say I have many threads that open the same file but they all do their own fopen and maintain their own FILE pointer.
  a) is it necessary to lock fwrite calls if they have their own FILE ptrs?
  b) if it is necessary, is locking around fwrite enough or will they potentially flush at different times and end up intermingling when they flush?  If yes, would locking on fwrite and then fflush cover it?</p>