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.

作者 loewis
收信人 amaury.forgeotdarc, kristjan.jonsson, loewis, mhammond, ocean-city
日期 2009-02-06.23:56:51
SpamBayes Score 4.070056e-09
Marked as misclassified
Message-id <1233964673.18.0.997263827668.issue4804@psf.upfronthosting.co.za>
In-reply-to
内容
I think the comment (an invalid fd would be a C program bug)
misrepresents the facts. Please don't check it in as-is. An invalid file
descriptor is *not* assertable. The authority on file descriptors, the
POSIX standard, specifies for, say, write(2)

[...] Otherwise, -1 shall be returned and errno set to indicate the error.
[...] [EBADF] The fildes argument is not a valid file descriptor open
for writing.

This is consistent throughout the entire API: the behavior for invalid
file descriptors is *not* undefined, and not even
implementation-defined. If the CRT would conform to the relevant,
long-existing specifications it tries to emulate, it would just set
errno to EBADF, and be done.

There should be a global declaration of _Py_verify_fd. I would also
suggest that it becomes a constant macro unless _MSC_VER is defined.
历史
日期 用户 动作 参数
2009-02-06 23:57:53loewis修改recipients: + loewis, mhammond, amaury.forgeotdarc, kristjan.jonsson, ocean-city
2009-02-06 23:57:53loewis修改messageid: <1233964673.18.0.997263827668.issue4804@psf.upfronthosting.co.za>
2009-02-06 23:56:53loewis链接issue4804 messages
2009-02-06 23:56:51loewis创建