Skip to content

Commit

Permalink
trying another alternative for sigterm
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefmih committed Mar 26, 2024
1 parent e0fc87d commit 674d81b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 674d81b

Please sign in to comment.