From 674d81b6718479adf0a4acbf1a9f9519e30cd4d0 Mon Sep 17 00:00:00 2001 From: Yosef Mihretie Date: Tue, 26 Mar 2024 10:57:31 -0400 Subject: [PATCH] trying another alternative for sigterm --- shared.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared.py b/shared.py index 07517e4..d6fc839 100644 --- a/shared.py +++ b/shared.py @@ -72,8 +72,8 @@ def handle_signal(signum, _): allowing other processes to stop doing work """ print(f"handling signal {signum}") - with open(exit_file(), "w", encoding="utf-8") as f: - f.write(signum) + with open(exit_file(), "wb") as f: + f.write(bytes([signum])) def is_exiting():