summaryrefslogtreecommitdiff
path: root/wcsmbs/wcstoll.c
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-04-25 17:54:03 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-07-31 16:06:51 -0300
commitac7834d8b0ef403698b04e7f6934e4a675e51c89 (patch)
tree7e44781051c2ed5af2d1334b9a1838f202d6f798 /wcsmbs/wcstoll.c
parent6e16e91ee4afacc0ea0b6494f784cf1ded0c7055 (diff)
downloadglibc-ac7834d8b0ef403698b04e7f6934e4a675e51c89.tar.gz
posix: Use posix_spawn for wordexpazanella/posix_spawn-optimizations
This patch replaces the fork+exec by posix_spawn on wordexp, which allows a better scability on Linux and simplifies the thread cancellation handling. The only change which can not be implemented with posix_spawn the /dev/null check to certify it is indeed the expected device. I am not sure how effetive this check is since /dev/null tampering means something very wrong with the system and this is the least of the issues. My view is the tests is really out of the place and the hardening provided is minimum. If the idea is still to provide such check, I think a possibilty would be to open /dev/null, check it, add a dup2 file action, and close the file descriptor. Checked on powerpc64le-linux-gnu and x86_64-linux-gnu. * include/spawn.h (__posix_spawn_file_actions_addopen): New prototype. * posix/spawn_faction_addopen.c (posix_spawn_file_actions_addopen): Add internal alias. * posix/wordexp.c (create_environment, free_environment): New functions. (exec_comm_child, exec_comm): Use posix_spawn instead of fork+exec. * posix/wordexp-test.c: Use libsupport and remove atfork usage.
Diffstat (limited to 'wcsmbs/wcstoll.c')
0 files changed, 0 insertions, 0 deletions