Re: getrandom: Fail with ENOSYS when the system has no randomness source

2021-05-13 Thread Bruno Haible
Paul Eggert wrote: > On 5/9/21 7:51 AM, Bruno Haible wrote: > > if (fd < 0) > > -return fd; > > +{ > > + errno = ENOSYS; > > + return -1; > > +} > > If 'open' fails with errno equal to (say) EINTR or EAGAIN or EMFILE, > this doesn't mean the opera

Re: getrandom: Fail with ENOSYS when the system has no randomness source

2021-05-10 Thread Paul Eggert
On 5/9/21 7:51 AM, Bruno Haible wrote: if (fd < 0) -return fd; +{ + errno = ENOSYS; + return -1; +} If 'open' fails with errno equal to (say) EINTR or EAGAIN or EMFILE, this doesn't mean the operating system lacks a randomness source; it merel