消息 [136621]
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:27 | vstinner | 修改 | recipients:
+ vstinner, lemburg, pitrou, neologix |
| 2011-05-23 12:25:26 | vstinner | 修改 | messageid: <1306153526.98.0.695363771693.issue12158@psf.upfronthosting.co.za> |
| 2011-05-23 12:25:26 | vstinner | 链接 | issue12158 messages |
| 2011-05-23 12:25:26 | vstinner | 创建 | |
|