File access questions
Nathan Sims <[email protected]> Tue, 15 Nov 2011 18:02:27 -0800
| Newsgroups | gmane.comp.macosx.devel |
|---|---|
| Message-ID | <[email protected]> |
I have one Cocoa-based process that needs to publish a small amount of = data (32 bytes) about 1/sec to n other C-based processes that are busy = doing calculations. I was thinking of writing to a small file in /tmp, = and then the other process could read it (if/when they choose to).=20 Q: Does a file opened for write-only "w" access preclude others from = reading it? Will an open "r" call to a file that's being written simply = hang until the writer closes it? Will a write-only open call on a file = that's being read hang? Perhaps there's a better approach to this...