musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/stdlib/wcstod.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012年11月05日 14:30:15 -0500
committerRich Felker <dalias@aerifal.cx>2012年11月05日 14:30:15 -0500
commite8a0b27a7101f5b9939de83df3d6d8b606c5678b (patch)
tree7545ed6491dff15ae0d71d38f778876b5e64d14f /src/stdlib/wcstod.c
parent32d6d77e544dbb1d9c44cacfc2ea0cbfe5ccfdef (diff)
downloadmusl-e8a0b27a7101f5b9939de83df3d6d8b606c5678b.tar.gz
improve SOCK_NONBLOCK/SOCK_CLOEXEC fallback code
checking for EINVAL should be sufficient, but qemu user emulation returns EPROTONOSUPPORT in some of the failure cases, and it seems conceivable that other kernels doing linux-emulation could make the same mistake. since DNS lookups and other important code might break if the fallback does not get invoked, be extra careful and check for either error. note that it's important NOT to perform the fallback code on other errors such as resource-exhaustion cases, since the fallback is not atomic and will lead to file-descriptor leaks in multi-threaded programs that use exec. the fallback code is only "safe" to run when the initial failure is caused by the application's choice of arguments, not the system state.
Diffstat (limited to 'src/stdlib/wcstod.c')
0 files changed, 0 insertions, 0 deletions
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月12日 01:23:54 +0000

AltStyle によって変換されたページ (->オリジナル) /