[issue12856] tempfile PRNG reuse between parent and child process

Ferringb report at bugs.python.org
Tue Aug 30 04:07:48 CEST 2011

Ferringb <ferringb at gmail.com> added the comment:

> the test must be skipped where os.fork() isn't available (namely, under Windows)

Done, although I still humbly suggest telling windows to bugger off ;)

> I would do os.read(fd, 100) (or some other large value) rather than os.read(fd, 6), so that the test doesn't depend on the exact length of the random sequences produced

100 is no different than 6 (same potential exists); better to just use the length from the parent side access to the PRNG.  That leaves open the unlikely scenario of child returning 7 chars, parent 6, and child/parent agreeing on the first 6... which would very likely be a bug anyways.

Added file: http://bugs.python.org/file23068/unique-seed-per-process-tempfile.patch

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list