From 4063c7ee2a5c551f33dd188a9a2f4f5eac91cdb2 Mon Sep 17 00:00:00 2001 From: Mayank Jain Date: Tue, 30 Jan 2024 21:24:42 -0500 Subject: [PATCH] fix: Add Windows check to `exit_handler` --- neurosity/neurosity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neurosity/neurosity.py b/neurosity/neurosity.py index 3f9bd72..9d11cac 100644 --- a/neurosity/neurosity.py +++ b/neurosity/neurosity.py @@ -33,7 +33,8 @@ def exit_handler(self, signum=None, frame=None): self.remove_all_subscriptions() signal.signal(signal.SIGTERM, signal.SIG_DFL) signal.signal(signal.SIGINT, signal.SIG_DFL) - signal.signal(signal.SIGHUP, signal.SIG_DFL) + if system() != "Windows": + signal.signal(signal.SIGHUP, signal.SIG_DFL) os.kill(os.getpid(), signal.SIGTERM) def get_server_timestamp(self):