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.

作者 vstinner
收信人 lemburg, neologix, pitrou, vstinner
日期 2011-05-23.12:25:25
SpamBayes Score 6.933147e-09
Marked as misclassified
Message-id <1306153526.98.0.695363771693.issue12158@psf.upfronthosting.co.za>
In-reply-to
内容
Sometimes, we need to know the version of the Linux kernel. Recent examples: test if SOCK_CLOEXEC or O_CLOEXEC are supported by the kernel or not. Linux < 2.6.23 *silently* ignores O_CLOEXEC flag of open().

linux_version() is already implemented in test_socket, but it looks like test_posix does also need it.

Attached patch adds platform.linux_version(). It returns (a, b, c) (integers) or None (if not Linux).

It raises an error if the version string cannot be parsed.
历史
日期 用户 动作 参数
2011-05-23 12:25:27vstinner修改recipients: + vstinner, lemburg, pitrou, neologix
2011-05-23 12:25:26vstinner修改messageid: <1306153526.98.0.695363771693.issue12158@psf.upfronthosting.co.za>
2011-05-23 12:25:26vstinner链接issue12158 messages
2011-05-23 12:25:26vstinner创建