That's why you open /dev/urandom in advance of performing operations that require randomness. If that open fails, you don't go on to perform the operation that requires randomness.
open+read+close + all the mess associated with exhausting file descriptors > getentropy
fairly obvious, isn't it?