diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83aeb9f1a..d3aa81373 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - name: Check run: | pushd build - ninja -v check-ia2 + ninja -v check popd build-nginx: runs-on: self-hosted diff --git a/libia2/include/permissive_mode.h b/libia2/include/permissive_mode.h index 01ba60de8..6de9c117d 100644 --- a/libia2/include/permissive_mode.h +++ b/libia2/include/permissive_mode.h @@ -426,7 +426,7 @@ static pthread_t logging_thread IA2_SHARED_DATA; typeof(IA2_IGNORE(pthread_create)) __real_pthread_create; // The constructor that installs the signal handlers -__attribute__((constructor)) void install_permissive_mode_handler(void) { +void install_permissive_mode_handler(void) { struct sigaction act = { .sa_sigaction = IA2_IGNORE(permissive_mode_trampoline), .sa_flags = SA_SIGINFO, @@ -446,9 +446,15 @@ __attribute__((constructor)) void install_permissive_mode_handler(void) { // Create the logging thread __real_pthread_create(&logging_thread, NULL, IA2_IGNORE(log_mpk_violations), NULL); +} + +// The constructor that installs the signal handlers +__attribute__((constructor)) void permissive_mode_init(void) { // When the process forks call this function again to reinstall these signal // handlers and call pthread_atfork again pthread_atfork(NULL, NULL, IA2_IGNORE(install_permissive_mode_handler)); + + install_permissive_mode_handler(); } /* diff --git a/rewriter/tests/sighandler/CMakeLists.txt b/rewriter/tests/sighandler/CMakeLists.txt index a0d07c5b8..6e812efe8 100644 --- a/rewriter/tests/sighandler/CMakeLists.txt +++ b/rewriter/tests/sighandler/CMakeLists.txt @@ -10,6 +10,7 @@ define_test( NEEDS_LD_WRAP PKEY 1 CRITERION_TEST + NOT_IN_CHECK_IA2 ) define_ia2_wrapper()