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 | movement |
|---|---|
| Recipients | |
| Date | 2006年03月31日.04:37:58 |
| SpamBayes Score | |
| Marked as misclassified | |
| Message-id | |
| In-reply-to |
| Content | |
|---|---|
The specification for seek() says: seek( offset[, whence]) Note that if the file is opened for appending (mode 'a' or 'a+'), any seek() operations will be undone at the next write. Consider operating on an fdopen()ed file. The Python source simply calls into the OS-provided fdopen(): http://pxr.openlook.org/pxr/source/Modules/posixmodule.c#3530 However, the POSIX standard http://www.opengroup.org/onlinepubs/009695399/functions/fdopen.html says: "Although not explicitly required by this volume of IEEE Std 1003.1-2001, a good implementation of append (a) mode would cause the O_APPEND flag to be set." Thus, to ensure Python semantics, Python's fdopen() must perform an fcntl() to ensure O_APPEND is set. For example, on Solaris, this optional O_APPEND behaviour is not applied: http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/port/stdio/fdopen.c?r=1.22#97 This has recently caused serious problems with the Mercurial SCM. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2007年08月23日 14:38:58 | admin | link | issue1461855 messages |
| 2007年08月23日 14:38:58 | admin | create | |