This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] getrandom system call wrapper [BZ #17252]
- From: Zack Weinberg <zackw at panix dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Torvald Riegel <triegel at redhat dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 9 Sep 2016 10:41:41 -0400
- Subject: Re: [PATCH v3] getrandom system call wrapper [BZ #17252]
- Authentication-results: sourceware.org; auth=none
- References: <661db778-8110-82b2-2c41-d6195916cbea@redhat.com> <1473430905.30192.5.camel@localhost.localdomain> <a93942f0-c688-8d8e-92dc-8fad856838b1@redhat.com>
On Fri, Sep 9, 2016 at 10:28 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 09/09/2016 04:21 PM, Torvald Riegel wrote:
>> On Thu, 2016-09-08 at 13:44 +0200, Florian Weimer wrote:
>>>
>>> I have made the system call wrapper a cancellation point. (If we
>>> implement the simpler getentropy interface, it would not be a
>>> cancellation point.)
>>
>>
>> Why did you do that?
>
> I have to, because it can block indefinitely.
Is it practical to make it a cancellation point if and only if called
in blocking mode? I suspect that is the behavior basically everyone
wants. Unlike with file descriptors, blocking/nonblocking is visible
in the flags passed to the function, so it might not be hard.
(What does Solaris' implementation do? OpenBSD's?)
zw