]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/sigbus.c
void call of page_size guarantees that sysconf is not called from signal handler
[thirdparty/systemd.git] / src / basic / sigbus.c
index 70afba6bcf83d4213f67c166d632c87acf2be069..d5254eab9d3854f2eb52ccf3b8c3caf1cd9b5d66 100644 (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)