Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(157598)

#21207: urandom persistent fd - not re-openned after fd close

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 3 months ago by steven-python
Modified:
5 years, 2 months ago
Reviewers:
cf.natali
CC:
rhettinger, AntoinePitrou, haypo, christian.heimes, alex, grooverdan, Charles-François Natali, devnull_psf.upfronthosting.co.za, steven-python_hiscocks.me.uk
Visibility:
Public.

Patch Set 1 #

Total comments: 2

Patch Set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_os.py View 1 1 chunk +43 lines, -0 lines 0 comments Download
Python/random.c View 1 5 chunks +39 lines, -10 lines 0 comments Download

Messages

Total messages: 1
Charles-François Natali
5 years, 2 months ago #1
http://bugs.python.org/review/21207/diff/11670/Python/random.c
File Python/random.c (right):

http://bugs.python.org/review/21207/diff/11670/Python/random.c#newcode77
Python/random.c:77: static ino_t urandom_st_ino;
Since those two variables are related, maybe put them in an untagged struct?

http://bugs.python.org/review/21207/diff/11670/Python/random.c#newcode124
Python/random.c:124: if (fstat(urandom_fd, &st)
IMO, not releasing the GIL around fstat() isn't too bad: as long as it points to
the read /dev/urandom, it shouldn't block, and if it doesn't, the user/code
probably screwed up, and we're already doing him a favor with this extra check
:)
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+