Skip to content

Commit 674d81b

Browse files
committed
trying another alternative for sigterm
1 parent e0fc87d commit 674d81b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shared.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def handle_signal(signum, _):
7272
allowing other processes to stop doing work
7373
"""
7474
print(f"handling signal {signum}")
75-
with open(exit_file(), "w", encoding="utf-8") as f:
76-
f.write(signum)
75+
with open(exit_file(), "wb") as f:
76+
f.write(bytes([signum]))
7777

7878

7979
def is_exiting():

0 commit comments

Comments
 (0)