use kernel-provided AT_MINSIGSTKSZ for sysconf(_SC_[MIN]SIGSTKSZ)
authorRich Felker <dalias@aerifal.cx>
Fri, 26 Aug 2022 15:34:46 +0000 (11:34 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 26 Aug 2022 15:34:46 +0000 (11:34 -0400)
commit996b6154b20184c3b08cce28eb01edb7f47e9413
tree3db80b6e5da61f809baf98899a4d69b8e3103cfc
parent25340a93375fc6d3324ab65c154edbf8d1701801
use kernel-provided AT_MINSIGSTKSZ for sysconf(_SC_[MIN]SIGSTKSZ)

use the legacy constant values if the kernel does not provide
AT_MINSIGSTKSZ (__getauxval will return 0 in this case) and as a
safety check if something is wrong and the provided value is less than
the legacy constant.

sysconf(_SC_SIGSTKSZ) returns SIGSTKSZ adjusted for the difference
between the legacy constant MINSIGSTKSZ and the runtime value, so that
the working space the application has on top of the minimum remains
invariant under changes to the minimum.
src/conf/sysconf.c