Message136621
| Author |
vstinner |
| Recipients |
lemburg, neologix, pitrou, vstinner |
| Date |
2011年05月23日.12:25:25 |
| SpamBayes Score |
6.933147e-09 |
| Marked as misclassified |
No |
| Message-id |
<1306153526.98.0.695363771693.issue12158@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2011年05月23日 12:25:27 | vstinner | set | recipients:
+ vstinner, lemburg, pitrou, neologix |
| 2011年05月23日 12:25:26 | vstinner | set | messageid: <1306153526.98.0.695363771693.issue12158@psf.upfronthosting.co.za> |
| 2011年05月23日 12:25:26 | vstinner | link | issue12158 messages |
| 2011年05月23日 12:25:26 | vstinner | create |
|