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

Thomas Lamprecht t.lamprecht at proxmox.com
Fri Nov 29 13:31:41 CET 2024


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.




More information about the pbs-devel mailing list