Re: [PATCH] perf io: Make open and read calls more robust

From: Ian Rogers
Date: Wed Jun 15 2022 - 15:17:42 EST


On Wed, Jun 15, 2022 at 11:47 AM Andi Kleen <ak@xxxxxxxxxxxxxxx> wrote:
>
>
> On 6/14/2022 11:03 PM, Ian Rogers wrote:
> > Wrap open and read calls with TEMP_FAILURE_RETRY in case a signal
> > causes the syscall to need to restart.
>
>
> Why not just use SA_RESTART on the signals?

As explained to Adrian, existing code is EINTR tolerant, some of the
code is in libraries and for portability shouldn't assume SA_RESTART.

Thanks,
Ian

>
> -Andi
>