Comment 10 for bug 269188

Revision history for this message
In , Mh+mozilla (mh+mozilla) wrote :

Created attachment 339195
Patch

We've go several people reporting that iceweasel would freeze at startup on some appliances of the web kiosk kind that just boot up to iceweasel almost directly, until some mouse movements occur and/or keys are pressed. This is due to the fact that Linux's /dev/random uses mouse and keys to get some entropy, and /dev/random blocks when it doesn't have enough entropy. /dev/urandom is a (weaker) version that doesn't block. /dev/urandom is actually used in NSS already.

Anyways, I see two possibilities, here, one of which I am sending a patch for. Please tell me if you'd prefer the other approach.
- Use /dev/urandom on Linux (BSD variants have already a non blocking (weak) RNG on /dev/random)
- Use clock_gettime() to get a real high resolution clock response, but that would depend on the resolution (clock_getres()) ; high resolution clock is quite recent in linux iirc.