[PATCH v4 1/1] ldconfig: add --install option
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Wed Jun 10 12:18:49 GMT 2026
On 10/06/26 04:33, Florian Weimer wrote:
> * DJ Delorie:
>
>> Florian Weimer <fweimer@redhat.com> writes:
>>> And it requires installing a signal handler. Otherwise, the process
>>> just goes away. I don't think installs signal handlers.
>>
>> My first thought was "malloc a big enough array, and do it in one read
>> and one write"
>>
>> Then I thought "or I could write robust, efficient code, to act as a
>> sample of high quality code for future engineers."
>
> That's good point. That suggests using TEMP_FAILURE_RETRY.
>
> There might also be network file systems that produce short writes
> without signals.
>
> Maybe we should add official glibc wrappers for read/write-style
> functions that retry properly? Including vector variants, that can be
> especially tricky?
I still think a more robust user feedback is just to error in such cases,
as elf/cache.c does for other writes. If you are building the ld.so.cache
in such environments, there might be something unreliable that might corrupt
the cache in some unknown cases that we might not handle correctly.
More information about the Libc-alpha
mailing list