Message5148

Author pjenvey
Recipients fwierzbicki, gaddo, pjenvey, zyasoft
Date 2009-09-13.23:16:10
SpamBayes Score 3.104479e-08
Marked as misclassified No
Message-id <1252883772.16.0.0515101617995.issue1466@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-09-13 23:16:12pjenveysetmessageid: <1252883772.16.0.0515101617995.issue1466@psf.upfronthosting.co.za>
2009-09-13 23:16:12pjenveysetrecipients: + pjenvey, fwierzbicki, zyasoft, gaddo
2009-09-13 23:16:11pjenveylinkissue1466 messages
2009-09-13 23:16:10pjenveycreate