I do check for a failure on open(); I just left that out as not relevant to the question. The code is running on a linux system (FC3) so is it sane enough so that I don't need to do the file locking? The string I write out may have embedded carriage returns if that makes a difference. | [reply] |
You can check the open() man page on your system, but I believe it's safe if the data fits in one block, which typically means 4K or less on Linux.
| [reply] |
Whether you check return values is always relevant IMHO. You should at least include it to let us know you thought about and are doing it so as not cause someone to chase after a potential red herring in your code. See my earlier message in this thread. Were you checking the return value of close()? It's highly relevant.
| [reply] [d/l] |
I'll be more careful in the future to make it clear if I'm checking returned values from system calls. And I am checking the return value from close() now. I wasn't before.
| [reply] |