Message5148
For this smaller example you just need to fd.flush() or close() in line
3 to get the right output.
The bigger problem is that 'a' mode doesn't use O_APPEND, which makes
writes always append to EOF regardless of the fd's position. You could
use it to open a log file twice, for example, and both fds would always
append to the end (though in reality I'm not sure how safe that actually
is when files are buffered by the underlying OS)
So the JVM provides one single way of getting a file in O_APPEND, via
FileOutputStream(file, appending=True). Unfortunately that fd is opened
write only, so we couldn't support the 'a+' mode with it |
|
Date |
User |
Action |
Args |
2009-09-13 23:16:12 | pjenvey | set | messageid: <1252883772.16.0.0515101617995.issue1466@psf.upfronthosting.co.za> |
2009-09-13 23:16:12 | pjenvey | set | recipients:
+ pjenvey, fwierzbicki, zyasoft, gaddo |
2009-09-13 23:16:11 | pjenvey | link | issue1466 messages |
2009-09-13 23:16:10 | pjenvey | create | |
|