Open
Description
Setting errno in support makes controlling whether errno is set much more difficult. Errno should be set as close to the return of a public function as possible.
List of places that need to be changed:
- __support/OSUtil/linux/fcntl.cpp - change to returning
ErrorOr
since if there's an error it always returns -1. - __support/OSUtil/linux/vdso.cpp - currently calling public functions in support, which is also a problem. Move
getauxval
to an internal utility that doesn't set errno and this problem goes away. - __support/HashTable/randomness.h - same issue as vdso, calling public functions leads to setting errno.