[pbs-devel] [PATCH proxmox] sys: fs: set FD_CLOEXEC when creating temp files

Dominik Csapak d.csapak at proxmox.com
Fri Nov 29 14:12:33 CET 2024


On 11/29/24 13:31, Thomas Lamprecht wrote:
> Am 29.11.24 um 11:21 schrieb Thomas Lamprecht:
>> Am 29.11.24 um 09:02 schrieb Dominik Csapak:
>>> the question for me is if it's ok to use since mkostemp is only a glibc extension (since 2.7) and we
>>> may use that in proxmox-backup-client which we want to statically build ?
>>> (not sure how that static compilation works with such a thing though...)
>>
>> FWIW, it's supported by MUSL:
>>
>> http://git.musl-libc.org/cgit/musl/tree/src/temp/mkostemp.c
> 
> And just to clarify, the rust libc crate supports different libc targets and
> exposes mkostemp among others (all?) for both, the GNU libc a musl libc
> targets.
> 
> So using that method might be indeed the best option for now and should not
> hinder any static builds, as if not with glibc then we highly probably do
> them with musl.

great, thanks for looking that up. I'll send a v2 with using mkostemp
(with a small nix like wrapper around, so we can it as a drop in replacement,
and maybe send it upstream?)






More information about the pbs-devel mailing list