Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/engine/init.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2025 Hewlett Packard Enterprise Development LP

Check failure on line 3 in src/engine/init.c

View workflow job for this annotation

GitHub Actions / Copyright check

Copyright out of date
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -1204,6 +1204,7 @@
main(int argc, char **argv)
{
sigset_t set;
bool exit_failure = false;
int sig;
int rc;

Expand Down Expand Up @@ -1238,6 +1239,7 @@

/** wait for shutdown signal */
sigemptyset(&set);
sigaddset(&set, SIGBUS);
sigaddset(&set, SIGINT);
sigaddset(&set, SIGTERM);
sigaddset(&set, SIGUSR1);
Expand All @@ -1248,7 +1250,6 @@
D_ERROR("failed to wait for signals: %d\n", rc);
break;
}

/* open specific file to dump ABT infos and ULTs stacks */
if (sig == SIGUSR1 || sig == SIGUSR2) {
struct timeval tv;
Expand Down Expand Up @@ -1322,12 +1323,18 @@
continue;
}

/* SIGINT/SIGTERM cause server shutdown */
/* Log error for SIGBUS occurrence */
if (sig == SIGBUS) {
D_ERROR("SIGBUS signal received; proceeding to shutdown.\n");
exit_failure = true;
}

/* SIGINT/SIGTERM/SIGBUS cause server shutdown */
break;
}

/** shutdown */
server_fini(true);

exit(EXIT_SUCCESS);
exit(exit_failure ? EXIT_FAILURE : EXIT_SUCCESS);
}
Loading