This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes, cotton.seed
Date 2021-01-26.05:38:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1611639512.03.0.762101489848.issue43028@roundup.psfhosted.org>
In-reply-to
Content
The high level and low level variants behave the same if you pass in the same flags. You are using the append flag in "open()", but you don't pass the os.O_APPEND flag to "os.open()".

>>> import os
>>> fd = os.open('log', os.O_WRONLY | os.O_APPEND | os.O_CREAT)
>>> os.lseek(fd, 1, os.SEEK_SET)
1
>>> os.write(fd, b'foo')
3
>>> os.close(fd)
>>> os.stat('log').st_size
3

>>> fd = os.open('log2', os.O_WRONLY | os.O_CREAT)
>>> os.lseek(fd, 1, os.SEEK_SET)
1
>>> os.write(fd, b'foo')
3
>>> os.close(fd)
>>> os.stat('log2').st_size
4
History
Date User Action Args
2021-01-26 05:38:32christian.heimessetrecipients: + christian.heimes, cotton.seed
2021-01-26 05:38:32christian.heimessetmessageid: <1611639512.03.0.762101489848.issue43028@roundup.psfhosted.org>
2021-01-26 05:38:32christian.heimeslinkissue43028 messages
2021-01-26 05:38:31christian.heimescreate