From 5656af1429d289cfaa92adfc0f6526f25a8fb2fe Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Thu, 29 Jun 2023 14:00:07 -0700 Subject: [PATCH] Update to a function --- README.md | 3 --- awscrt/common.py | 3 +++ source/common.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fd21affde..1dde3ff70 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,3 @@ Please note that on Mac, once a private key is used with a certificate, that cer ``` static: certificate has an existing certificate-key pair that was previously imported into the Keychain. Using key from Keychain instead of the one provided. ``` - -## Crash Handler -You can enable the crash handler by setting the environment variable `AWS_CRT_ENABLE_CRASH_HANDLER=1`. This will generate crash dumps in the event of a fatal error. diff --git a/awscrt/common.py b/awscrt/common.py index 3ef62552f..ef8f016dd 100644 --- a/awscrt/common.py +++ b/awscrt/common.py @@ -21,4 +21,7 @@ def get_cpu_count_for_group(group_idx: int) -> int: def install_crash_handler(): + """ + Registers a crash handler that will generate crash dumps in the event of a fatal error. + """ _awscrt.install_crash_handler() diff --git a/source/common.c b/source/common.c index 537e98b05..a21b89746 100644 --- a/source/common.c +++ b/source/common.c @@ -92,5 +92,5 @@ PyObject *aws_py_install_crash_handler(PyObject *self, PyObject *args) { sigaction(SIGILL, &sa, NULL); sigaction(SIGBUS, &sa, NULL); #endif - return Py_None; + Py_RETURN_NONE; }