Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 44e31ba

Browse files
author
Victor Stinner
committed
faulthandler: we don't use (or need) SA_SIGINFO flag of sigaction()
1 parent 9699440 commit 44e31ba

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Modules/faulthandler.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,7 @@ faulthandler_dump_traceback_py(PyObject *self,
218218
This function is signal safe and should only call signal safe functions. */
219219

220220
static void
221-
faulthandler_fatal_error(
222-
int signum
223-
#ifdef HAVE_SIGACTION
224-
, siginfo_t *siginfo, void *ucontext
225-
#endif
226-
)
221+
faulthandler_fatal_error(int signum)
227222
{
228223
const int fd = fatal_error.fd;
229224
unsigned int i;
@@ -320,7 +315,7 @@ faulthandler_enable(PyObject *self, PyObject *args, PyObject *kwargs)
320315
for (i=0; i < faulthandler_nsignals; i++) {
321316
handler = &faulthandler_handlers[i];
322317
#ifdef HAVE_SIGACTION
323-
action.sa_sigaction = faulthandler_fatal_error;
318+
action.sa_handler = faulthandler_fatal_error;
324319
sigemptyset(&action.sa_mask);
325320
/* Do not prevent the signal from being received from within
326321
its own signal handler */

0 commit comments

Comments
 (0)