void call of page_size guarantees that sysconf is not called from signal handler

This commit is contained in:
Daniel 2018-07-26 15:39:12 +02:00
parent 14a6aee050
commit 1595b257df
1 changed files with 4 additions and 0 deletions

View File

@ -113,6 +113,10 @@ void sigbus_install(void) {
.sa_flags = SA_SIGINFO,
};
/* make sure that sysconf() is not called from a signal handler because
* it is not guaranteed to be async-signal-safe since POSIX.1-2008 */
(void) page_size();
n_installed++;
if (n_installed == 1)