STINNER Victor added the comment: Hi,
Марк Коренберг added the comment: > Man getrandom() > > As of Linux 3.19, the following bug exists: > > * Depending on CPU load, getrandom() does not react to interrupts > before reading all bytes requested. > > So, is it goot to use this syscall now? I saw a fix proposed on the LKML but it looks like it was not merged. I don't know what to think about this bug. getrandom(n, GRND_NONBLOCK) behaviour depends if /dev/urandom was feeded with enough entropy and the value of n. It should not be interrupted by signal for n <= 256. Can you reproduce the bug? Which kind of applications can hang because of this bug? I would prefer to continue to use getrandom() syscall on Linux, avoid using a file descriptor is really useful. Maybe we can try to document the behaviour of os.urandom() for signal handling? Or at least redirect users to getrandom() manual page. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25420> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com