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 vstinner
Recipients 700eb415, Arfrever, alex, anand.jeyahar, christian.heimes, josh.r, jwilk, neologix, pitrou, vstinner
Date 2015-03-03.02:04:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1425348257.63.0.160018665876.issue22181@psf.upfronthosting.co.za>
In-reply-to
Content
Commit in the Linux kernel:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c6e9d6f38894798696f23c8084ca7edbf16ee895

--

Here is a patch to use the new getrandom() syscall of Linux 3.17 in the Python function os.urandom().

The function falls back to reading /dev/urandom if getrandom() is not supported (returns ENOSYS at runtime).

On my Linux 3.18, the EINTR path is never taken. But I was able to test it manually by setting flags to GRND_RANDOM (2) and injecting many signals using signal.setitimer(): see my http://bugs.python.org/issue23285#msg237100
History
Date User Action Args
2015-03-03 02:04:17vstinnersetrecipients: + vstinner, pitrou, christian.heimes, jwilk, Arfrever, alex, neologix, anand.jeyahar, josh.r, 700eb415
2015-03-03 02:04:17vstinnersetmessageid: <1425348257.63.0.160018665876.issue22181@psf.upfronthosting.co.za>
2015-03-03 02:04:17vstinnerlinkissue22181 messages
2015-03-03 02:04:17vstinnercreate